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.
---------------------------(end of broadcast)--------------------------- TIP 5: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faqs/FAQ.html