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.