RE: DBI memory usage

[prev] [thread] [next] [Date index for 2005/01/19]

From: Theo Petersen
Subject: RE: DBI memory usage
Date: 15:51 on 19 Jan 2005
PL/Perl isn't new, but they've expanded it in 8.0, and made it more obvious
how to do selects and updates from within a Perl-coded stored procedure.

Between that and Peter Haworth's clarifications on cursors, I'm revisiting a
lot of PG issues in my code.  Should lead to interesting times :)

..Theo

-----Original Message-----
From: Fred Moyer [mailto:fred@xxxxxxxxxxxxxxxxxx.xxx] 
Sent: Tuesday, January 18, 2005 2:11 PM
To: Chris Ochs
Cc: Peter Haworth; modperl@xxxx.xxxxxx.xxx
Subject: Re: DBI memory usage

>> > 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 you want at a time:
>
> DBD::Pg doesn't support cursors.  From the DBD::PG manpage:

This is true that DBD::Pg doesn't support cursors, but you can write a
pl/pgsql function that returns a cursor reference and implement in this
manner:

$sth = $dbh->prepare("FETCH ALL FROM $your_ref_cursor");
while($sth->fetch){}

pl/perl was just introduced also, but I haven't looked at it enough to
know if you could use it to write the function.

(message missing)

DBI memory usage
Chris Ochs 01:06 on 18 Jan 2005

Re: DBI memory usage
Perrin Harkins 01:18 on 18 Jan 2005

Re: DBI memory usage
Perrin Harkins 01:23 on 18 Jan 2005

Re: DBI memory usage
Chris Ochs 01:46 on 18 Jan 2005

Re: DBI memory usage
Peter Haworth 10:43 on 18 Jan 2005

Re: DBI memory usage
Chris Ochs 18:12 on 18 Jan 2005

Re: DBI memory usage
Peter Haworth 11:12 on 19 Jan 2005

Re: DBI memory usage
Steven Lembark 04:26 on 18 Jan 2005

Re: DBI memory usage
Chris Ochs 04:44 on 18 Jan 2005

Re: DBI memory usage
Sean Davis 11:03 on 18 Jan 2005

Re: DBI memory usage
Fred Moyer 21:10 on 18 Jan 2005

Re: DBI memory usage
Fred Moyer 21:11 on 18 Jan 2005

RE: DBI memory usage
Theo Petersen 15:51 on 19 Jan 2005

Generated at 17:42 on 27 Jan 2005 by mariachi v0.52