|
Posted by noone on 03/13/06 23:55
comp.lang.php wrote:
> noone wrote:
>> NC wrote:
>>
>> > comp.lang.php wrote:
>> >> jonathan.beckett wrote:
>> >> > Don't do it. You'll kill the webserver. It's also just an incredibly
>> >> > bad way of doing it.
>> >>
>> >> Why? Wouldn't hitting the database hundreds of times be even worse?
>>
>> > Not in your case; your MySQL client may end up running out of memory
>> > due to the large size of the result set...
>>
>> > Cheers,
>> > NC
>>
>>
>> why would anyone need to display resultsetst that large - they are
>> generally worthless to look at and even less useful to find the
>> information you really need to see...
>>
>> If the resultsets are too large you will:
>>
>> Kill the server - returning all of those records
>> Kill the network - saturate it with unnecessary data.
>> Kill the DSL/Cable connection
>> Kill the PC - trying to download the information
>> Kill the Browser... Can you say - need more memory?
>>
> As lame as it is going to sound, the customer wants to be able to view
> ANY of their existing records whenever they want, including the option
> to [shudders] "View ALL students".. yes, they want to be able to view
> all 3,000, 4,000, zillion student at one time if they choose to do so.
> *sigh*
> Phil
>>
>> Depending on the number of requests for this process, 1 and 2 will most
>> likely bite you.
What I have done in the past is that if they want that much data - the
browser is the wrong tool for the job -- is to send headers such that it
thinks it is a CSV file (application/excel???) and let them open it up in
Excel.
I have also dumped the data to a tmp file, opened the file and only read x
number of lines at a time... Depending on the file size - takes longer
and longer to retrieve the data - but it worked...
sometimes it can be a learning experience for the customer. There are
times when you need to "coach" them into thinking that it is a very bad
idea. Especially since there could a lot of personnal data displayed -
which is a huge security risk.
What school so I know not to send my kids there...? :)
Navigation:
[Reply to this message]
|