From: | Philip Warner <pjw(at)rhyme(dot)com(dot)au> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)jp> |
Cc: | pgsql-committers(at)postgresql(dot)org |
Subject: | Re: pgsql/src/backend/nodes (copyfuncs.c outfuncs.c print.c) |
Date: | 2000-10-28 13:34:00 |
Message-ID: | 3.0.5.32.20001028233400.02f58140@mail.rhyme.com.au |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers pgsql-hackers |
At 21:03 28/10/00, wrote:
>
>In a plain SELECT, yes. In a DECLARE CURSOR, it's currently set up
>to prefer indexscans anyway, LIMIT or no LIMIT (see lines 853 ff in
>src/backend/optimizer/plan/planner.c, current sources). I think it
>makes sense to have that preference for DECLARE, and what I'm wondering
>is if we need an additional preference when the DECLARE contains a LIMIT
>clause --- and if so, what should that be?
Do you really think it's not such a good idea to have different optimizer
behaviour for SELECT and DECLARE CURSOR? My expectation is that putting a
SELECT statement inside a cursor should not change it's performance. I'd be
interested to know the reasons for your choice.
The simplest solution would be to use the same logic in both cases; if the
correct behaviour is not obvious to you, then our users will be left second
guessing the optimizer once you start introducing several special cases
(LIMIT in SELECT, LIMIT ALL in SELECT, LIMIT in DECLARE etc etc).
----------------------------------------------------------------
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 |/
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2000-10-28 14:57:47 | Re: pgsql/src/makefiles (Makefile.freebsd Makefile.hpux Makefile.irix5 Makefile.linux Makefile.netbsd Makefile.openbsd Makefile.osf Makefile.solaris Makefile.unixware) |
Previous Message | Larry Rosenman | 2000-10-28 02:17:09 | Re: pgsql/src/makefiles (Makefile.freebsd Makefile.hpux Makefile.irix5 Makefile.linux Makefile.netbsd Makefile.openbsd Makefile.osf Makefile.solaris Makefile.unixware) |
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2000-10-28 14:40:16 | Re: Problem with installing as root |
Previous Message | Peter Eisentraut | 2000-10-28 12:21:06 | Re: Second proposal: what to do about INET/CIDR |