X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.193]) by svr1.postgresql.org (Postfix) with ESMTP id 6EF0330E68B for ; Fri, 20 Jun 2003 17:06:59 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (svr1.postgresql.org [64.117.224.193]) (amavisd-new, port 10024) with ESMTP id 79425-05 for ; Fri, 20 Jun 2003 14:06:47 -0300 (ADT) Received: from imo-r01.mx.aol.com (imo-r01.mx.aol.com [152.163.225.97]) by svr1.postgresql.org (Postfix) with ESMTP id 736DC30E689 for ; Fri, 20 Jun 2003 14:06:46 -0300 (ADT) Received: from yusuf0478@netscape.net by imo-r01.mx.aol.com (mail_out_v36.3.) id k.1b0.6683956 (16237) for ; Fri, 20 Jun 2003 13:06:43 -0400 (EDT) Received: from netscape.net (66-163-11-108.ip.tor.radiant.net [66.163.11.108]) by air-in03.mx.aol.com (v94.29) with ESMTP id MAILININ31-3f6d3ef33f222ce; Fri, 20 Jun 2003 13:06:43 -0400 Message-ID: <3EF33F22.4000801@netscape.net> Date: Fri, 20 Jun 2003 13:06:42 -0400 From: Yusuf User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.2) Gecko/20030208 Netscape/7.02 X-Accept-Language: en-us, en MIME-Version: 1.0 To: pgsql-performance Subject: Re: Deleting one record from a table taking 17s. References: <3EF32DF8.3060900@netscape.net> <1056125163.41752.31.camel@jester> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Mailer: Unknown (No Version) X-Archive-Number: 200306/132 X-Sequence-Number: 2216 rbt@rbt.ca wrote: > On Fri, 2003-06-20 at 15:53, Yusuf wrote: > >>Why would the following query take soo long to run? What does 28.12 msec represent, since the total running time is >>16801.86 ms. > > > I'd hazard to guess that you have a whole slew of foreign keys cascading > to delete, update, or check many rows from other tables. > > Those are not represented in the explains at the moment. > That's what I thought at first, so I dropped the foreign key constraints. The table is referenced by 2 tables, one of which has around 200 000 records and the other has 0 records.