Re: Cursors and different settings for default_statistics_target - Mailing list pgsql-performance

From Steinar H. Gunderson
Subject Re: Cursors and different settings for default_statistics_target
Date
Msg-id 20080401195744.GA22880@uio.no
Whole thread Raw
In response to Re: Cursors and different settings for default_statistics_target  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-performance
On Tue, Apr 01, 2008 at 12:42:03PM -0400, Tom Lane wrote:
>> That's CURSOR_OPT_FAST_PLAN and isn't it? Our application reads the full
>> results of most cursors.
> Just out of curiosity, why use a cursor at all then?

This isn't the same scenario as the OP, but I've used a cursor in cases where
I cannot keep all of the dataset in memory at the client at once, but I _can_
coerce it down to a more manageable size as it comes in.

I don't know if a cursor is the only way to do this (short of making a custom
function inside Postgres of some sort), but it seems to be the simplest way
in libpqxx, at least.

/* Steinar */
--
Homepage: http://www.sesse.net/

pgsql-performance by date:

Previous
From: Tom Lane
Date:
Subject: Re: Cursors and different settings for default_statistics_target
Next
From: "samantha mahindrakar"
Date:
Subject: Too many commands in a transaction