> // IF I RUN THIS THROUGH A LOOP:
> // for($j=0;$j<20, $j++){ $many_selected[$jj] = fu_bar($pg,
> $BIG_SELECT_cmd)} THE TEST PROGRAM CRASHES  so I think I have
> more copies of the result of this query than I need.

This is just going to create a multi-dimensional array - with each
element being one result set - so yes that's going to take a lot of memory.


To debug your memory issue, see some ideas here:

http://www.davedevelopment.co.uk/2008/05/12/log-memory-usage-using-declare-and-ticks-in-php/

but instead of keeping a global variable (or session variable), log it
to a file instead:

http://www.davedevelopment.co.uk/2008/05/12/log-memory-usage-using-declare-and-ticks-in-php/#comment-52074

-- 
Postgresql & php tutorials
http://www.designmagick.com/

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

Reply via email to