X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 3464A5281E for ; Tue, 5 Jul 2005 09:32:12 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 81210-05 for ; Tue, 5 Jul 2005 12:32:05 +0000 (GMT) Received: from wolff.to (wolff.to [66.93.197.194]) by svr1.postgresql.org (Postfix) with SMTP id 8E15352814 for ; Tue, 5 Jul 2005 09:32:03 -0300 (ADT) Received: (qmail 11854 invoked by uid 500); 5 Jul 2005 12:32:17 -0000 Date: Tue, 5 Jul 2005 07:32:17 -0500 From: Bruno Wolff III To: David Gagnon Cc: Stephan Szabo , pgsql-performance@postgresql.org Subject: Re: Why the planner is not using the INDEX . Message-ID: <20050705123217.GA11379@wolff.to> Mail-Followup-To: Bruno Wolff III , David Gagnon , Stephan Szabo , pgsql-performance@postgresql.org References: <20050630222451.GA17628@calvin.surfutopia.net> <42C473BA.9090305@commandprompt.com> <20050630235821.GA2163@calvin.surfutopia.net> <42C994BD.3000909@siunik.com> <20050704132446.O14579@megazone.bigpanda.com> <42C9D47E.7090103@siunik.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <42C9D47E.7090103@siunik.com> User-Agent: Mutt/1.5.6i X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.007 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200507/36 X-Sequence-Number: 13277 On Mon, Jul 04, 2005 at 20:29:50 -0400, David Gagnon wrote: > Thanks .. I miss that FK don't create indexed ... since Primary key > implicitly does ... > > I'm a bit surprised of that behavior thought, since it means that if we > delete a row from table A all tables (B,C,D) with FK pointing to this > table (A) must be scanned. But in some applications you don't ever do that, so you don't save anything by having the index for deletes but have to pay the cost to update it when modifying the referencing table. If you think an index will help in your case, just create one.