pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Rod Taylor <rbt@rbt.ca>
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 22:16:53 -0400
Message-ID: <13910.1082341013@sss.pgh.pa.us> (raw)
In-Reply-To: <1082331774.47576.136.camel@jester>
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>
	<1082331774.47576.136.camel@jester>

Rod Taylor <rbt@rbt.ca> writes:
>> 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.

Try trawling the archives --- I recall several cases in which people
were using sub-selects for this purpose.

In any case, I don't see the value of having the planner check to see if
a sub-select is just a trivial arithmetic expression.  The cases where
people write that and expect it to be simplified are so few and far
between that I can't believe it'd be a good use of planner cycles.

			regards, tom lane



view thread (7+ messages)  latest in thread

Message-ID: <13910.1082341013@sss.pgh.pa.us>
Permalink:  ../13910.1082341013@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/13910.1082341013@sss.pgh.pa.us

 · 

reply

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: tgl@sss.pgh.pa.us, rbt@rbt.ca, twanger@bluetwanger.de, litaowu@yahoo.com
  Subject: Re: sunquery and estimated rows
  In-Reply-To: <13910.1082341013@sss.pgh.pa.us>

* 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