Re: Exporting large data from mysql to html using php

From: Date: Tue, 25 Oct 2011 23:15:49 +0000
Subject: Re: Exporting large data from mysql to html using php
References: 1 2 3 4 5 6 7 8 9 10  Groups: php.general 
Request: Send a blank email to php-general+get-315425@lists.php.net to get a copy of this message
On 2011-10-25, at 6:56 PM, Jason Pruim <lists@pruimphotography.com> wrote: > > Jason Pruim > lists@pruimphotography.com > > > > On Oct 25, 2011, at 6:35 PM, Jim Giner wrote: > >> 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 > > > The bosses wanted them to be able to page through the results... But I might bring that up to > them again... Working with 89 million records (With the number going up and expanding in the future) > could cause lots of issues in the long run... Guarantee the bosses will never use it. If they had to page thru 89m records, they'd rebel too > > >> >> On Oct 25, 2011, at 6:26 PM, Jason Pruim <lists@pruimphotography.com> 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! :) >>> >>> >>> >>>> >>>> -- >>>> 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 >> > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > Bastien Koert 905-904-0334

« previous php.general (#315425) next »