Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Tjapr-00071d-6z for pgsql-performance@arkaria.postgresql.org; Fri, 14 Dec 2012 19:22:15 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1Tjapq-0002mm-D7 for pgsql-performance@arkaria.postgresql.org; Fri, 14 Dec 2012 19:22:14 +0000 Received: from makus.postgresql.org ([98.129.198.125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Tjapp-0002mh-IM for pgsql-performance@postgresql.org; Fri, 14 Dec 2012 19:22:13 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Tjapj-0000P6-Kp for pgsql-performance@postgresql.org; Fri, 14 Dec 2012 19:22:12 +0000 Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.5/8.14.5) with ESMTP id qBEJM5bY004674; Fri, 14 Dec 2012 14:22:05 -0500 (EST) From: Tom Lane To: "Kevin Grittner" cc: "AI Rumman" , "Claudio Freire" , "Evgeny Shishkin" , "Andrew Dunstan" , "postgres performance list" Subject: Re: Why does the number of rows are different in actual and estimated. In-reply-to: <20121214191427.80090@gmx.com> References: <20121214191427.80090@gmx.com> Comments: In-reply-to "Kevin Grittner" message dated "Fri, 14 Dec 2012 14:14:27 -0500" Date: Fri, 14 Dec 2012 14:22:05 -0500 Message-ID: <4673.1355512925@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-performance Precedence: bulk Sender: pgsql-performance-owner@postgresql.org "Kevin Grittner" writes: > AI Rumman wrote: >> Does FK Constraint help to improve performance? Or it is only >> for maintaining data integrity? > I'm not aware of any situation where adding a foreign key > constraint would improve performance. There's been talk of teaching the planner to use the existence of FK constraints to improve plans, but I don't believe any such thing is in the code today. regards, tom lane -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance