Again why even do a detail query? Nobody is going to examine pages and pages and etc. Do a summary qry if u just need a count - no pagination there jg
On Oct 25, 2011, at 6:26 PM, Jason Pruim <li...@pruimphotography.com> wrote: > > Jason Pruim > li...@pruimphotography.com > > > > 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! :) > > > >> >> -- >> PHP General Mailing List (http://www.php.net/) >> To unsubscribe, visit: http://www.php.net/unsub.php >> > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php