X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 86EE5D1D09C for ; Sun, 18 Apr 2004 20:43:52 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 73713-01 for ; Sun, 18 Apr 2004 20:43:53 -0300 (ADT) Received: from tht.net (vista.tht.net [216.126.88.2]) by svr1.postgresql.org (Postfix) with ESMTP id 3B0C7D1D064 for ; Sun, 18 Apr 2004 20:43:50 -0300 (ADT) Received: from [134.22.69.199] (dyn-69-199.tor.dsl.tht.net [134.22.69.199]) by tht.net (Postfix) with ESMTP id D132876A2A; Sun, 18 Apr 2004 19:43:57 -0400 (EDT) Subject: Re: sunquery and estimated rows From: Rod Taylor To: Tom Lane Cc: Markus Bertheau , Litao Wu , Postgresql Performance 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> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-lUbIYknmc3AnUBbPQ3d/" Message-Id: <1082331774.47576.136.camel@jester> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.5 Date: Sun, 18 Apr 2004 19:42:55 -0400 X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200404/300 X-Sequence-Number: 6600 --=-lUbIYknmc3AnUBbPQ3d/ Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Sun, 2004-04-18 at 19:09, Tom Lane wrote: > Markus Bertheau writes: > > , 17.04.2004, 01:45, Tom Lane : > >> The planner sees that as "where scope =3D " > >> and falls back to a default estimate. It won't simplify a sub-select > >> to a constant. (Some people consider that a feature ;-).) >=20 > > Why? >=20 > 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. --=20 Rod Taylor Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL PGP Key: http://www.rbt.ca/signature.asc --=-lUbIYknmc3AnUBbPQ3d/ Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQBAgxJ96DETLow6vwwRAsIkAJ91VWf31bzt826YLFp5TaIU2847SwCeP5bd EL/fSZkC394t55ypX0sD2GQ= =xhey -----END PGP SIGNATURE----- --=-lUbIYknmc3AnUBbPQ3d/--