Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search archives
  Advanced Search

Re: LIMIT in DECLARE CURSOR: request for comments



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(at)gmx(dot)net       http://yi.org/peter-e/




Home | Main Index | Thread Index

Privacy Policy | About PostgreSQL
Copyright © 1996 – 2012 PostgreSQL Global Development Group