pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Steinar H. Gunderson <sgunderson@bigfoot.com>
To: pgsql-performance@postgresql.org
Subject: Re: Cursors and different settings for default_statistics_target
Date: Tue, 1 Apr 2008 21:57:44 +0200
Message-ID: <20080401195744.GA22880@uio.no> (raw)
In-Reply-To: <9999.1207068123@sss.pgh.pa.us>
References: <B710F3299F04664DB6B37C258FDEEB940158AFF9@FABAMAIL.fabagl.fabasoft.com>
	<2798.1207063805@sss.pgh.pa.us>
	<B710F3299F04664DB6B37C258FDEEB940158B0E9@FABAMAIL.fabagl.fabasoft.com>
	<9629.1207066619@sss.pgh.pa.us>
	<B710F3299F04664DB6B37C258FDEEB940158B0FC@FABAMAIL.fabagl.fabasoft.com>
	<9999.1207068123@sss.pgh.pa.us>

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/



view thread (10+ messages)  latest in thread

Message-ID: <20080401195744.GA22880@uio.no>
Permalink:  ../20080401195744.GA22880@uio.no/
Also on:    postgresql.org/message-id/20080401195744.GA22880@uio.no

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: sgunderson@bigfoot.com
  Subject: Re: Cursors and different settings for default_statistics_target
  In-Reply-To: <20080401195744.GA22880@uio.no>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox