pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Yusuf <yusuf0478@netscape.net>
To: pgsql-performance <pgsql-performance@postgresql.org>
Subject: Deleting one record from a table taking 17s.
Date: Fri, 20 Jun 2003 11:53:28 -0400
Message-ID: <3EF32DF8.3060900@netscape.net> (raw)

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.




view thread (5+ messages)  latest in thread

Message-ID: <3EF32DF8.3060900@netscape.net>
Permalink:  ../3EF32DF8.3060900@netscape.net/
Also on:    postgresql.org/message-id/3EF32DF8.3060900@netscape.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-performance@postgresql.org
  Cc: yusuf0478@netscape.net
  Subject: Re: Deleting one record from a table taking 17s.
  In-Reply-To: <3EF32DF8.3060900@netscape.net>
  References: <3EF32DF8.3060900@netscape.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox