Re: LIMIT in DECLARE CURSOR: request for comments - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: LIMIT in DECLARE CURSOR: request for comments
Date
Msg-id Pine.LNX.4.21.0010310406220.777-100000@peter.localdomain
Whole thread Raw
In response to LIMIT in DECLARE CURSOR: request for comments  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: LIMIT in DECLARE CURSOR: request for comments
Re: LIMIT in DECLARE CURSOR: request for comments
List pgsql-hackers
Tom Lane writes:

> 1. If DECLARE CURSOR does not contain a LIMIT, continue to plan on the
> basis of 10%-or-so fetch

I'd say that normally you're not using cursors because you intend to throw
away 80% or 90% of the result set, but instead you're using it because
it's convenient in your programming environment (e.g., ecpg).  There are
other ways of getting only some rows, this is not it.

So I think if you want to make optimization decisions based on cursors
being used versus a "normal" select, then the only thing you can safely
take into account is the network roundtrip and client processing per
fetch, but that might be as random as anything.

-- 
Peter Eisentraut      peter_e@gmx.net       http://yi.org/peter-e/



pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Re: [GENERAL] 7.0 vs. 7.1 (was: latest version?)
Next
From: Peter Eisentraut
Date:
Subject: Re: Current CVS broken?