Jason Pruim wrote: > > Jason Pruim > lists@xxxxxxxxxxxxxxxxxxxx > > > > On Oct 25, 2011, at 10:51 AM, Jim Giner wrote: > >> I disagree. It's not about "tuning the queries", it is more about the >> appl. design that currently thinks it SHOULD do such huge queries. >> >> My approach would be to prompt the user for filtering criteria that >> automatically would reduce the result set size. Although at this time I >> believe the OP mentioned that the db is just telephone numbers so that >> doesn't leave much room for filter-criteria. >> >> > > Yes it is just phone numbers... The only select that I'm running on the > entire site is related to the pagination... A simple: $sqlCount = "SELECT > COUNT(*) FROM main WHERE state = '{$state}'"; > > which limits it to everything inside the state... Unfortunately if you > look at the possibilities, it's still quite a large dataset... 89 million > :) > > The rest of the query's will be much more limited to areacode, exchange, > and in some cases the full phone number... Maybe the better way to do it > would be not to count the records.... But set a variable with the total > count... That way I don't have to load all the data... The data amount > won't change alot... Easy enough to set a variable... Just need to see if > I can integrate that with the pagination... > > Back to the drawing board! :) > Consider running EXPLAIN on all your queries to see if there is something Mysql thinks could be done to improve performance. Cheers -- David Robley Why do they put Braille dots on the keypad of the drive-up ATM? Today is Prickle-Prickle, the 7th day of The Aftermath in the YOLD 3177. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php