Justtechjobs.com Find a programming school near you






Online Campus Both


php3-list | 199903

Re: [PHP3] 10 query results at a time... From: Daniel Lashua (daniel.lashua <email protected>)
Date: 03/08/99

Well... depends on.... faster overall would be to get all the records
and have PHP parse them... however, the initial request will take longer
than the small 10 row requests would take. So... are you looking for
overall speed, or speed in between each page? If you don't mind having
your users wait a while for the first request, it is probably best to
get it all at once, and throw it in a flat file or in shared memory or
something, and then retrieve it piece by piece as needed.

Daniel

Sam Goin wrote:
>
> Hello,
>
> I have 2 questions.
>
> 1. Would it be faster for the client to get a semi-large query result, and
> then use php3 to display 10 rows from the result at a time, or would it be
> faster to query the database 10 rows at a time?
>
> I am using Apache 1.3.4 and MySQL. The results from each row would be less
> than 15 KB, and the total result would be no more than 300 rows.
>
> 2. Can you give me an example code for the answer to #1?
>
> Thanks,
>
> Sam Goin
>
> --
> PHP 3 Mailing List http://www.php.net/
> To unsubscribe send an empty message to php3-unsubscribe <email protected>
> To subscribe to the digest list: php3-digest-subscribe <email protected>
> For help: php3-help <email protected> Archive: http://www.php.net/mailsearch.php3
> List administrator: zeev-list-admin <email protected>

--
PHP 3 Mailing List   http://www.php.net/
To unsubscribe send an empty message to php3-unsubscribe <email protected>
To subscribe to the digest list:  php3-digest-subscribe <email protected>
For help: php3-help <email protected>  Archive:  http://www.php.net/mailsearch.php3
List administrator:  zeev-list-admin <email protected>