On Friday 19 July 2002 10:21, Georgie Casey wrote: > in ym search page, i construct a sql query from user input to search my > database, and i run this query to get totalresults. Then run another query > with a LIMIT 0, 30 ending for each page. So I'm running 2 mySQL queries per > page. My question is, is this inefficient? is there any better way i dont > know of? or does the 2 queries not mka emuch of a difference
If the results of the first query were small enough to be completely kept in the (RAM) cache then the second query would be performed much quicker. -- Jason Wong -> Gremlins Associates -> www.gremlins.com.hk Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* "Don't hate me because I'm beautiful. Hate me because I'm beautiful, smart and rich." -- Calvin Keegan */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php