Optimizing DELETE

Поиск
Список
Период
Сортировка
От Ivan Voras
Тема Optimizing DELETE
Дата
Msg-id 450FEF1A.4070106@fer.hr
обсуждение исходный текст
Ответы Re: Optimizing DELETE  (Csaba Nagy <nagy@ecircle-ag.com>)
Re: Optimizing DELETE  (Rod Taylor <rbt@rbt.ca>)
Re: Optimizing DELETE  (Mark Lewis <mark.lewis@mir3.com>)
Список pgsql-performance
I've just fired off a "DELETE FROM table" command (i.e. unfiltered
DELETE) on a trivially small table but with many foreign key references
(on similar-sized tables), and I'm waiting for it to finish. It's been
10 minutes now, which seems very excessive for a table of 9000 rows on a
3 GHz desktop machine.

'top' says it's all spent in USER time, and there's a ~~500KB/s write
rate going on. Just before this DELETE, I've deleted data from a larger
table (50000 rows) using the same method and it finished in couple of
seconds - maybe it's a PostgreSQL bug?

My question is: assuming it's not a bug, how to optimize DELETEs?
Increasing work_mem maybe?

(I'm using PostgreSQL 8.1.4 on FreeBSD 6- amd64)

(I know about TRUNCATE; I need those foreign key references to cascade)

В списке pgsql-performance по дате отправления:

Предыдущее
От: Markus Schaber
Дата:
Сообщение: Re: High CPU Load
Следующее
От: "Bucky Jordan"
Дата:
Сообщение: Re: Large tables (was: RAID 0 not as fast as expected)