Re: LIMIT and get_num_rows
| From: | Jason Wong | Date: | Mon, 14 Jan 2002 11:12:00 +0000 |
| Subject: | Re: LIMIT and get_num_rows | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-15755@lists.php.net to get a copy of this message | ||
On Monday 14 January 2002 19:06, matt stewart wrote:
> but presumably if i'm doing a SELECT count(*) FROM Designs WHERE Keywords
> LIKE "%sport%"
> followed by a SELECT * FROM Designs WHERE Keywords LIKE "%sport%" LIMIT
> 0,20
>
> it's still using nearly as much processing time as just returning all the
> designs and just using a get_num_rows and then only using the first 20?
>
Possibly, I don't know. BUT if query returns 8000 records as opposed to 20,
then it definitely uses up a bit more memory. This may be an issue if you
have loads of such queries happening simultaneously.
--
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
/*
Love is not enough, but it sure helps.
*/