Re: Exporting large data from mysql to html using php

From: Date: Wed, 26 Oct 2011 01:44:34 +0000
Subject: Re: Exporting large data from mysql to html using php
References: 1 2 3 4 5 6 7 8  Groups: php.general 
Request: Send a blank email to php-general+get-315426@lists.php.net to get a copy of this message
Jason Pruim wrote: > > Jason Pruim > lists@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! :) > 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.

« previous php.general (#315426) next »