PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Logiciels d'hébergement > mailing.database.mysql > Results in multiple pages. Takes too much time
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
Results in multiple pages. Takes too much time

Réponse
 
LinkBack Outils de la discussion
Vieux 11/07/2006, 19h10   #1
premgrps@gmail.com
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Results in multiple pages. Takes too much time

Hi,
I have a table of a million records and wrote a CGI-PERL script to
display the results based on the user input. The results might be
anywhere from 100 to 1000 per query and presently I am displaying them
as 25 results per page.

Problem: Each query is taking about 20-30 seconds.

My solution: I have tried to optimize the table and also index the
table. I have actually converted a MS access database to SQL database,
so it wasn't previously indexed. Both optimization and indexing doesn't
give any good results. I always get a timeout. ie. it takes longer
after indexing and optimizing.

1. I was wondering if someone has a creative solution for this. ie.
reduce the time from 20-30 seconds to atleast 10 seconds.

2. I have links of pages of results beneath the first page result. When
each of these links are clicked it takes 20-30 seconds again. Is there
a way I can reduce the time taken for the subsequent pages are reduced?
I cannot use the LIMIT option in mysql, since I have a where clause
which has to search through the whole table. I tried using views and
using limits, but it takes as much time.

Please let me know.

Thanks.

  Réponse avec citation
Vieux 12/07/2006, 20h23   #2
Jeff
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Results in multiple pages. Takes too much time

premgrps@gmail.com wrote:

> Hi,
> I have a table of a million records and wrote a CGI-PERL script to
> display the results based on the user input.


Post some code, it seems to me that you may be doing something wrong,
wrong, wrong... I'm assuming you are using DBI, just post the execute
and fetch part of the code.


The results might be
> anywhere from 100 to 1000 per query and presently I am displaying them
> as 25 results per page.
>
> Problem: Each query is taking about 20-30 seconds.


Could be for non indexed... What do the indexes look like and what
does your SQL look like?
>
> My solution: I have tried to optimize the table and also index the
> table. I have actually converted a MS access database to SQL database,
> so it wasn't previously indexed. Both optimization and indexing doesn't
> give any good results. I always get a timeout. ie. it takes longer
> after indexing and optimizing.
>
> 1. I was wondering if someone has a creative solution for this. ie.
> reduce the time from 20-30 seconds to atleast 10 seconds.
>
> 2. I have links of pages of results beneath the first page result. When
> each of these links are clicked it takes 20-30 seconds again. Is there
> a way I can reduce the time taken for the subsequent pages are reduced?
> I cannot use the LIMIT option in mysql,


Sure you can, limit has a "start" and an "end" value. Frankly I don't
know how they do this in SQL Server where you only have top.

Jeff


since I have a where clause
> which has to search through the whole table. I tried using views and
> using limits, but it takes as much time.
>
> Please let me know.
>
> Thanks.
>

  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 07h11.


Édité par : vBulletin® version 3.7.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,07876 seconds with 10 queries