I insert data every second in my table. Every minute I delete from the table some row to keep max 10000 rows in the table.
At the beginning deletes consume about 20% CPU time. After 24 houts every delete needs up tu 100% CPU time (updates too).
Vacuuming doesn't help.
After I restart postmaster, it works again very quick.
Any ideas?


Delete query:

WHERE time_stamp >= 0.0 AND
time_stamp < (SELECT max(time_stamp)
FROM (SELECT time_stamp
FROM tbl ORDER BY time_stamp, id_event_archive ASC LIMIT 222) AS t)

PK: id_event_archive
Index: time_stamp

Postgres version: 7.3.3.
OS: Solaris 2.8

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
     joining column's datatypes do not match

Reply via email to