Re: LIMIT in DECLARE CURSOR: request for comments

From: Philip Warner <pjw(at)rhyme(dot)com(dot)au>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: LIMIT in DECLARE CURSOR: request for comments
Date: 2000-10-31 11:43:37
Message-ID: 3.0.5.32.20001031224337.02905d40@mail.rhyme.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

At 10:51 31/10/00 +0100, Peter Eisentraut wrote:
>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.

Yes!

>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.

Which is why I like the client being able to ask the optimizer for certain
kinds of solutions *explicitly*.

----------------------------------------------------------------
Philip Warner | __---_____
Albatross Consulting Pty. Ltd. |----/ - \
(A.B.N. 75 008 659 498) | /(@) ______---_
Tel: (+61) 0500 83 82 81 | _________ \
Fax: (+61) 0500 83 82 82 | ___________ |
Http://www.rhyme.com.au | / \|
| --________--
PGP key available upon request, | /
and from pgp5.ai.mit.edu:11371 |/

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Gunnar R|nning 2000-10-31 11:50:53 Re: how good is PostgreSQL
Previous Message Peter Eisentraut 2000-10-31 10:27:23 Re: Re: BIT/BIT VARYING status