On Fri, Oct 28, 2011 at 14:05, Jim Long <p...@umpquanet.com> wrote:
>
> the tail end of the output becomes:
>
>  274695    134202232
>  274696    134202672
>  274697    134203112
>  274698    134203552
>  274699    134203992
> PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to 
> allocate 240 bytes) in xx3.php on line 27

    Each row increases memory allocation by 440 bytes.  274,700 rows
would equal 120,868,000 bytes of MySQL data in the buffer.
Subtracting the 240 bytes from the 440 anticipated in the 274,700th
row, that means the memory footprint of your script in execution
(including PHP and its extensions, Apache, the MySQL connection, et
cetera) is utilizing 13,349,928 (roughly 13.4MB), which is pretty
average, depending on the configuration and bloat of the builds you're
using.

    Ways around this: increase memory allocation and risk bogging-down
your machine, or use mysql_unbuffered_query().

-- 
</Daniel P. Brown>
Network Infrastructure Manager
http://www.php.net/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to