| From: | Rod Taylor <rbt(at)rbt(dot)ca> |
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
| Cc: | Markus Bertheau <twanger(at)bluetwanger(dot)de>, Litao Wu <litaowu(at)yahoo(dot)com>, Postgresql Performance <pgsql-performance(at)postgresql(dot)org> |
| Subject: | Re: sunquery and estimated rows |
| Date: | 2004-04-18 23:42:55 |
| Message-ID: | 1082331774.47576.136.camel@jester |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-performance |
On Sun, 2004-04-18 at 19:09, Tom Lane wrote:
> Markus Bertheau <twanger(at)bluetwanger(dot)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.asc
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Greg Stark | 2004-04-19 00:40:35 | Re: Wierd context-switching issue on Xeon |
| Previous Message | Dave Cramer | 2004-04-18 23:34:41 | Re: Wierd context-switching issue on Xeon |