RE: DBI memory usage

2005-01-19 Thread Theo Petersen
to interesting times :) ..Theo -Original Message- From: Fred Moyer [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 18, 2005 2:11 PM To: Chris Ochs Cc: Peter Haworth; modperl@perl.apache.org Subject: Re: DBI memory usage >> > It looks like $r->child_terminate does what I need. In the

Re: DBI memory usage

2005-01-19 Thread Peter Haworth
On Tue, 18 Jan 2005 10:12:06 -0800, Chris Ochs wrote: > On Tue, 18 Jan 2005 10:43:02 +, Peter Haworth > <[EMAIL PROTECTED]> wrote: > > By using a cursor, you can specify exactly how much data you want > > at a time: > > DBD::Pg doesn't support cursors. From the DBD::PG manpage: > > "Although

Re: DBI memory usage

2005-01-18 Thread Fred Moyer
>> > It looks like $r->child_terminate does what I need. In the case of >> > Postgresql it eats the memory when you execute the query, regardless >> > of whether you actually fetch any results. >> >> That can be worked around, however. By using a cursor, you can specify >> exactly how much data yo

Re: DBI memory usage

2005-01-18 Thread Fred Moyer
>> > It looks like $r->child_terminate does what I need. In the case of >> > Postgresql it eats the memory when you execute the query, regardless >> > of whether you actually fetch any results. >> >> That can be worked around, however. By using a cursor, you can specify >> exactly how much data yo

Re: DBI memory usage

2005-01-18 Thread Chris Ochs
On Tue, 18 Jan 2005 10:43:02 +, Peter Haworth <[EMAIL PROTECTED]> wrote: > On Mon, 17 Jan 2005 17:46:17 -0800, Chris Ochs wrote: > > It looks like $r->child_terminate does what I need. In the case of > > Postgresql it eats the memory when you execute the query, regardless > > of whether you ac

Re: DBI memory usage

2005-01-18 Thread Sean Davis
On Jan 17, 2005, at 11:44 PM, Chris Ochs wrote: Also ask yourself if you really need all of the data at once. You may be able to filter it down in the query or build some incremental data structures using row-by-row iteration instead of fetchall_arrayref. Ya I do, it's basically a customer list exp

Re: DBI memory usage

2005-01-18 Thread Peter Haworth
On Mon, 17 Jan 2005 17:46:17 -0800, Chris Ochs wrote: > It looks like $r->child_terminate does what I need. In the case of > Postgresql it eats the memory when you execute the query, regardless > of whether you actually fetch any results. That can be worked around, however. By using a cursor, you

Re: DBI memory usage

2005-01-17 Thread Chris Ochs
> > Also ask yourself if you really need all of the data at > once. You may be able to filter it down in the query or > build some incremental data structures using row-by-row > iteration instead of fetchall_arrayref. Ya I do, it's basically a customer list export from the database that I write o

Re: DBI memory usage

2005-01-17 Thread Steven Lembark
Is there a way to do large queries that return lots of data without having my apache process grow by the equivalent size in ram of the data returned? Yes. Many databases support sending the results a few rows at a time instead of all at once. For specific advice on this, you might check your DBD

Re: DBI memory usage

2005-01-17 Thread Chris Ochs
> > Yes. Many databases support sending the results a few rows at a time > > instead of all at once. For specific advice on this, you might check > > your DBD documentation or ask on the dbi-users list. You can also have > > your program schedule the current apache process to exit after finishin

Re: DBI memory usage

2005-01-17 Thread Perrin Harkins
Perrin Harkins wrote: Chris Ochs wrote: Is there a way to do large queries that return lots of data without having my apache process grow by the equivalent size in ram of the data returned? Yes. Many databases support sending the results a few rows at a time instead of all at once. For specific

Re: DBI memory usage

2005-01-17 Thread Perrin Harkins
Chris Ochs wrote: Is there a way to do large queries that return lots of data without having my apache process grow by the equivalent size in ram of the data returned? Yes. Many databases support sending the results a few rows at a time instead of all at once. For specific advice on this, you mi

DBI memory usage

2005-01-17 Thread Chris Ochs
Is there a way to do large queries that return lots of data without having my apache process grow by the equivalent size in ram of the data returned? The only thing I can think of is to run a separate script outside of mod perl for queries like this. Chris