From: Rod Taylor <rbt@rbt.ca>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Markus Bertheau <twanger@bluetwanger.de>
Cc: Litao Wu <litaowu@yahoo.com>
Cc: Postgresql Performance <pgsql-performance@postgresql.org>
Subject: Re: sunquery and estimated rows
Date: Sun, 18 Apr 2004 19:42:55 -0400
Message-ID: <1082331774.47576.136.camel@jester> (raw)
In-Reply-To: <12050.1082329766@sss.pgh.pa.us>
References: <20040416214529.10468.qmail@web13125.mail.yahoo.com>
<3802.1082159101@sss.pgh.pa.us>
<1082316145.2191.0.camel@yarrow.bertheau.de>
<12050.1082329766@sss.pgh.pa.us>
On Sun, 2004-04-18 at 19:09, Tom Lane wrote:
> Markus Bertheau <twanger@bluetwanger.de> writes:
> > , 17.04.2004, 01:45, Tom Lane :
> >> The planner sees that as "where scope = <some complicated expression>"
> >> and falls back to a default estimate. It won't simplify a sub-select
> >> to a constant. (Some people consider that a feature ;-).)
>
> > Why?
>
> It's the only way to prevent it from simplifying when you don't want it
> to.
I'm having a difficult time coming up with a circumstance where that is
beneficial except when stats are out of whack.
Doesn't a prepared statement also falls back to the default estimate for
variables.
--
Rod Taylor <rbt [at] rbt [dot] ca>
Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL
PGP Key: http://www.rbt.ca/signature.ascAttachments:
signature.asc (application/pgp-signature, 186B) download
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: rbt@rbt.ca, tgl@sss.pgh.pa.us, twanger@bluetwanger.de, litaowu@yahoo.com
Subject: Re: sunquery and estimated rows
In-Reply-To: <1082331774.47576.136.camel@jester>
* 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