Do some profiling. Use PEAR's Timer class or just add here and there some echo 
microtime(). Find where is spent most of the time. If
it is in the queries than look at your db and find out whether you missed to add some 
index. If indexes are ok, try to make joined
queries (for mysql - LEFT JOIN (RIGHT JOIN) is probably the best choice escpecially if 
you have very big tables).

Andrey Hristov

----- Original Message -----
From: "George Pitcher" <[EMAIL PROTECTED]>
Sent: Tuesday, March 26, 2002 10:49 AM
Subject: [PHP-DB] variation on(Speed Up Code?)

> Hi all,
> One of the pages in my site takes up to 10 seconds to display (depending on
> number of records (30 records takes 10 secs).
> The cause of the problem is the amount of information I am displaying for
> each record. I do multiple queries for each record to find out different
> things such as its position in the workflow, its price, etc. None of these
> are stored in the db, but are calculated on the fly depending on the data
> held.
> Apart from storing the result in the db can anyone point me in the direction
> of some efficient handling routines?
> Code is available if anyone wants bloat-mail!
> George in Edinburgh
> --
> PHP Database Mailing List (
> To unsubscribe, visit:

PHP Database Mailing List (
To unsubscribe, visit:

Reply via email to