X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 2784AD1B57C for ; Fri, 13 Feb 2004 13:57:25 +0000 (GMT) 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 83523-08 for ; Fri, 13 Feb 2004 09:57:25 -0400 (AST) Received: from tht.net (vista.tht.net [216.126.88.2]) by svr1.postgresql.org (Postfix) with ESMTP id A4CD9D1B4E1 for ; Fri, 13 Feb 2004 09:57:21 -0400 (AST) Received: from [134.22.71.135] (dyn-71-135.tor.dsl.tht.net [134.22.71.135]) by tht.net (Postfix) with ESMTP id 03A7176C38; Fri, 13 Feb 2004 08:57:26 -0500 (EST) Subject: Re: 7.4 - FK constraint performance From: Rod Taylor To: Tom Lane Cc: ow , pgsql-sql@postgresql.org In-Reply-To: <27443.1076646336@sss.pgh.pa.us> References: <20040213010341.95282.qmail@web60801.mail.yahoo.com> <25808.1076634636@sss.pgh.pa.us> <1076640825.10896.12.camel@jester> <27443.1076646336@sss.pgh.pa.us> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-iNtOxgRRscvvxZOusvVc" Message-Id: <1076680669.10896.17.camel@jester> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.5 Date: Fri, 13 Feb 2004 08:57:50 -0500 X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200402/157 X-Sequence-Number: 16848 --=-iNtOxgRRscvvxZOusvVc Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Thu, 2004-02-12 at 23:25, Tom Lane wrote: > Rod Taylor writes: > > Statistics say there are 10 values. Statistics list the 10 most common > > values (all of them). Given this, would it not be reasonable to assume > > that 239 is a recent addition (if there at all) to the table and not > > very common? >=20 > We don't know that it's 239 when we make the plan. In order to know > that, we'd have to abandon caching of RI check query plans and re-plan > for each row. That strikes me as inevitably a losing proposition. Right, sorry, I forgot this was out of a fk trigger. --=20 Rod Taylor Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL PGP Key: http://www.rbt.ca/rbtpub.asc --=-iNtOxgRRscvvxZOusvVc 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) iD8DBQBALNfd6DETLow6vwwRAivsAKCBVxZ0178LqnZgW13bp0gSrCjUoACePEOX 1qVYXQRYKS004tjy/d/UCuU= =CDq8 -----END PGP SIGNATURE----- --=-iNtOxgRRscvvxZOusvVc--