Deleting one record from a table taking 17s.

From: Yusuf <yusuf0478(at)netscape(dot)net>
To: pgsql-performance <pgsql-performance(at)postgresql(dot)org>
Subject: Deleting one record from a table taking 17s.
Date: 2003-06-20 15:53:28
Message-ID: 3EF32DF8.3060900@netscape.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

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.

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Rod Taylor 2003-06-20 16:06:03 Re: Deleting one record from a table taking 17s.
Previous Message Tom Lane 2003-06-18 16:21:07 Re: Recent 7.4 change slowed down a query by a factor of 3