On Thursday 22 September 2005 11:06 am, Jeff Ambrosino wrote:

> I'm exporting a database table through a mod_perl2 handler.  The
> problem is that for large tables, the size of the httpd process
> balloons to consume alot of RAM.  For example, a 299mb MySQL table
> (size of .MYD file), which creates a 35mb export, causes httpd to
> consume about 220mb of RAM!
>
> My code is fairly straightforward, so I must be missing something
> about buffering or
>
> while ( my $rowref = $sth->fetchrow_arrayref ) {
>   $r->print $rowref->[0];
>   # ...more $r->print statements for each field...
> }

Does it do the same thing if you don't print anything? I believe some of the 
DBD's cache the entire result set rather than getting it a chunk at a time. 
Which dbd are you using?




-- 
"You heard Mr. Garibaldi. You did the right thing."
"Darling, I did the necessary thing. That is not always the same as
 the right thing."
- Janice and Laura Rosen in Babylon 5:"The Quality of Mercy"

Reply via email to