Re: Large selects handled inefficiently? - Mailing list pgsql-general

From Zlatko Calusic
Subject Re: Large selects handled inefficiently?
Date
Msg-id 87lmxexst4.fsf@atlas.iskon.hr
Whole thread Raw
In response to RE: Large selects handled inefficiently?  ("Andrew Snow" <als@fl.net.au>)
Responses Re: Large selects handled inefficiently?  (Jules Bean <jules@jellybean.co.uk>)
List pgsql-general
"Andrew Snow" <als@fl.net.au> writes:

> > I believe I can work around this problem using cursors (although I
> > don't know how well DBD::Pg copes with cursors).  However, that
> > doesn't seem right -- cursors should be needed to fetch a large query
> > without having it all in memory at once...
>

Yes, I have noticed that particular bad behaviour, too.
With DBD::Pg and DBD::mysql.

At the same time, DBD::Oracle, DBD::InterBase and DBD::Sybase work as
expected. Rows are fetched with fetchrow...() functions instead of all
being sucked up into memory at the time execute() is called.

Anybody know why is that happening?

> Actually, I think thats why cursors were invented in the first place ;-)  A
> cursor is what you are using if you're not fetching all the results of a
> query.
>

What bothers me is different behaviour of different DBD drivers. But,
yes, I have just subscribed to dbi-users list which is the right place
to ask that question.
--
Zlatko

pgsql-general by date:

Previous
From: Trurl McByte
Date:
Subject: Re: C++ Example
Next
From: David Steuber
Date:
Subject: Re: uninstall