On Sat, Oct 22, 2005 at 03:46:18PM -0400, Allen wrote: > I am trying to select a result set from a 2-table join, which should be > returning 5,045,358 rows. I receive this error: > > DBD::Pg::st execute failed: out of memory for query result AFAIK, DBD:Pg never uses a cursor unless you ask it to. So you probably want to code a loop like: DECLARE CURSOR blah AS ... while( FETCH 1000 ) { process rows... } If you don't use a cursor in the backend, then DBI will try to pull the *entire* result and store it in memory, which is why you don't have enough... Hope this helps, -- Martijn van Oosterhout <kleptog@xxxxxxxxx> http://svana.org/kleptog/ > Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a > tool for doing 5% of the work and then sitting around waiting for someone > else to do the other 95% so you can sue them.
Attachment:
pgpGmuL3htGrG.pgp
Description: PGP signature