X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 879F0D7F27 for ; Wed, 7 Sep 2005 18:38:49 -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 55110-09 for ; Wed, 7 Sep 2005 21:38:36 +0000 (GMT) Received: from flake.decibel.org (flake.decibel.org [67.100.216.10]) by svr1.postgresql.org (Postfix) with ESMTP id 52D2FD7B95 for ; Wed, 7 Sep 2005 18:38:32 -0300 (ADT) Received: by flake.decibel.org (Postfix, from userid 1001) id 936221527C; Wed, 7 Sep 2005 16:38:34 -0500 (CDT) Date: Wed, 7 Sep 2005 16:38:34 -0500 From: "Jim C. Nasby" To: Christopher Kings-Lynne Cc: Tom Lane , Brian Choate , pgsql-performance@postgresql.org Subject: Re: Poor performance of delete by primary key Message-ID: <20050907213834.GB83885@pervasive.com> References: <2F9239F5E316C54688FDA9814FF045D6EADACC@EXCHANGE.sf.nimblefish.com> <18162.1126020720@sss.pgh.pa.us> <431E5958.8040102@familyhealth.com.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <431E5958.8040102@familyhealth.com.au> X-Operating-System: FreeBSD 4.11-RELEASE-p10 i386 X-Distributed: Join the Effort! http://www.distributed.net User-Agent: Mutt/1.5.9i X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.007 required=5 tests=[AWL=0.007] X-Spam-Level: X-Archive-Number: 200509/114 X-Sequence-Number: 14422 On Wed, Sep 07, 2005 at 11:07:04AM +0800, Christopher Kings-Lynne wrote: > >Unfortunately there's no very simple way to determine which FK is the > >problem. (In 8.1 it'll be possible to do that with EXPLAIN ANALYZE, > >but in existing releases EXPLAIN doesn't break out the time spent in > >each trigger ...) You have to just eyeball the schema :-(. > > phpPgAdmin has a handy info feature where you can see all tables that > refer to the current one. You can always go and steal that query to > find them... You can also use pg_user_foreighn_key* from http://pgfoundry.org/projects/newsysviews/. -- Jim C. Nasby, Sr. Engineering Consultant jnasby@pervasive.com Pervasive Software http://pervasive.com work: 512-231-6117 vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461