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 CFE7130E71D for ; Fri, 20 Jun 2003 15:53:44 +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 64786-04 for ; Fri, 20 Jun 2003 12:53:32 -0300 (ADT) Received: from imo-d01.mx.aol.com (imo-d01.mx.aol.com [205.188.157.33]) by svr1.postgresql.org (Postfix) with ESMTP id 43CDC30E7C3 for ; Fri, 20 Jun 2003 12:53:32 -0300 (ADT) Received: from yusuf0478@netscape.net by imo-d01.mx.aol.com (mail_out_v36.3.) id k.1b6.66554f1 (16238) for ; Fri, 20 Jun 2003 11:53:29 -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 MAILININ32-3f6e3ef32df8216; Fri, 20 Jun 2003 11:53:29 -0400 Message-ID: <3EF32DF8.3060900@netscape.net> Date: Fri, 20 Jun 2003 11:53:28 -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: Deleting one record from a table taking 17s. Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Mailer: Unknown (No Version) X-Archive-Number: 200306/129 X-Sequence-Number: 2213 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. The table phoneinfo has a primary key called phoneinfo_id and the table has 400 000 records. mydb=#explain analyze delete from phoneinfo where phoneinfo_id = 85723; QUERY PLAN --------------------------------------------------------------------------------------------------------------------- ----- Index Scan using phoneinfo_pkey on phoneinfo (cost=0.00..3.81 rows=1 width=6) (actual time=27.93..27.94 rows=1 loop s=1) Index Cond: (phoneinfo_id = 85723) Total runtime: 28.12 msec (3 rows) Time: 16801.86 ms BTW, I have \timing on.