RE: question about storage capacity of array

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,
Suppose you got 10,000 records from database and assign it to an array, 
make sure you use mysql_free_result() before moving further, or else you 
will be having 20,000 records in memory. And you run out of memory for 
other variables.

Unless you are transferring database, getting many records might not be 
needed. It is better to use limit keyword in your sql query, and limit 
them to 1000 recs per query. Make use of paging so that user interface 
improves.

Regards
Manda Krishna Srikanth
http://www.krishnasrikanth.com

php-objects@xxxxxxxxxxxxxxx wrote on 02/13/2008 02:27:45 PM:

> My guess is it's the same limit as the amount of memory PHP is allowed 
to
> consume, set in PHP.INI which you may be able to adjust.
> 
> 10,000 records doesn't seem a lot, but you easily set up a loop test to 
see
> how many you can get in.
> 
> Rob.
> 
> -----Original Message-----
> From: php-objects@xxxxxxxxxxxxxxx [mailto:php-objects@xxxxxxxxxxxxxxx] 
On
> Behalf Of SaEeDoS
> Sent: 13 February 2008 07:37
> To: php-objects@xxxxxxxxxxxxxxx
> Subject:  question about storage capacity of array
> 
> Hi all..
> what the limitation of storage capacity of array in php...i mean
> i want to put 10,000 records in array ... can i ? 
> 
> thanks
> 
=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain 
confidential or privileged information. If you are 
not the intended recipient, any dissemination, use, 
review, distribution, printing or copying of the 
information contained in this e-mail message 
and/or attachments to it are strictly prohibited. If 
you have received this communication in error, 
please notify us by reply e-mail or telephone and 
immediately and permanently delete the message 
and any attachments. Thank you




[Non-text portions of this message have been removed]


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Soap]     [Kernel Newbies]     [Yosemite]     [Yosemite Campsites]

  Powered by Linux