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 C540ED1DA5F for ; Fri, 13 Feb 2004 04:25:40 +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 30984-06 for ; Fri, 13 Feb 2004 00:25:39 -0400 (AST) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by svr1.postgresql.org (Postfix) with ESMTP id 43936D1DA57 for ; Fri, 13 Feb 2004 00:25:38 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.11/8.12.11) with ESMTP id i1D4PaKu027444; Thu, 12 Feb 2004 23:25:36 -0500 (EST) To: Rod Taylor Cc: ow , pgsql-sql@postgresql.org Subject: Re: 7.4 - FK constraint performance In-reply-to: <1076640825.10896.12.camel@jester> References: <20040213010341.95282.qmail@web60801.mail.yahoo.com> <25808.1076634636@sss.pgh.pa.us> <1076640825.10896.12.camel@jester> Comments: In-reply-to Rod Taylor message dated "Thu, 12 Feb 2004 21:53:45 -0500" Date: Thu, 12 Feb 2004 23:25:36 -0500 Message-ID: <27443.1076646336@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200402/130 X-Sequence-Number: 16821 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? 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. regards, tom lane