Re: Results in multiple pages. Takes too much time



premgrps@xxxxxxxxx <premgrps@xxxxxxxxx> wrote:
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.

This is all SQL-related information. X-posting an SQL problem to
a computer language group doesn't help anyone.

Other information that might be helpful might include: number of
records in the table being queried; number of tables/joins/etc used to
generate queries; available memory on both the database server *and*
the web server.

And, the most important thing to post to a programming newsgroup:
as much actual and relevant code as necessary to produce the results
discussed.

It might be possible the CGI script is causing a significant portion
of your delay. If so, we need Perl code before we can help. If not,
then this is off-topic and doesn't belong here.

Cheers,
Tim Hammerquist
.



Relevant Pages

  • Re: database lookup
    ... the query on the subsequent page, and display the "drill down" data. ... The thing with PHP and MySQL is that you need the user to do an action ... I tried to state that I have the database designed and implemented but I ...
    (alt.php)
  • Re: "order by" issue after compact database
    ... primary key to establish a display order when you display table data. ... When you compact Access doesn't care about the "Order" of the records in the ... I have a Access 2003 database. ... I run a query on each table that is similar to the following and save ...
    (microsoft.public.access.queries)
  • Re: database lookup
    ... the query on the subsequent page, and display the "drill down" data. ... councileperson, that that data and query the database for the ... I tried to state that I have the database designed and implemented but I ...
    (alt.php)
  • Re: Selecting from Datasets
    ... If I then have a datagrid and I only want it to display Field 1 and field 2, ... I dont want it to requery the database, as it already exists within the ... is no longer displayed on the page, so there shouldn't be a memory problem. ... > query the database again. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: DBMS and lisp, etc.
    ... Naively implemented with SQL, again for 10 ... (1 query for the initial orders, 1 query for each order for its ... soon as you upgrade to the SQL database. ... (eq (order-customer orderA) ...
    (comp.lang.lisp)