For Programmers: Free Programming Magazines  


Home > Archive > PHP DB > March 2005 > RE: [PHP-DB] Re: paginating : optimising queries









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author RE: [PHP-DB] Re: paginating : optimising queries
Bastien Koert

2005-03-22, 3:56 pm

If its a big hit, are you sure that you have the proper indexes on the
table.

Another thing to consider is that if there is not a lot of activity on that
table, you could place the total in a session object and revalidate that
total every 10 queries or something to avoid querying the same table over
and over.

Or use another table to hold the total number of entries in that table so
that you are querying a small table without a lot of load on it. You could
fill this table via a CRON or trigger (if available)

bastien



>From: Zouari Fourat <fourat@gmail.com>
>Reply-To: Zouari Fourat <fourat@gmail.com>
>To: php-db@lists.php.net
>Subject: [PHP-DB] Re: paginating : optimising queries
>Date: Tue, 22 Mar 2005 17:02:57 +0100
>
>no one can help me outta here ?
>
>
>On Mon, 21 Mar 2005 01:58:10 +0100, Zouari Fourat <fourat@gmail.com> wrote:
>
>--
>PHP Database Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php
>

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com