Re: Impossibly slow DELETEs

Поиск
Список
Период
Сортировка
От Neil Conway
Тема Re: Impossibly slow DELETEs
Дата
Msg-id 87znekuhoq.fsf@mailbox.samurai.com
обсуждение исходный текст
Ответ на Impossibly slow DELETEs  (Stefan Champailler <schampailler@easynet.be>)
Ответы Re: Impossibly slow DELETEs  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Impossibly slow DELETEs  (Greg Stark <gsstark@mit.edu>)
Список pgsql-performance
Stefan Champailler <schampailler@easynet.be> writes:
> So here's my trouble : some DELETE statement take up to 1 minute to
> complete (but not always, sometimes it's fast, sometimes it's that
> slow). Here's a typical one : DELETE FROM response_bool WHERE
> response_id = '125' The response_bool table has no foreing key and
> no index on response_id column. No foreign key reference the
> response_bool table.

I'm skeptical that PostgreSQL is causing the performance problem
here -- 1 minute for a DELETE on a single-page table is absurdly
slow. If you enable the log_min_duration_statement configuration
variable, you should be able to get an idea of how long it actually
takes PostgreSQL to execute each query -- do you see some 60 second
queries in the log?

What is the system load like when the query takes a long time? For
example, `vmstat 1` output around this point in time would be
helpful.

Does PostgreSQL consume a lot of CPU time or do a lot of disk I/O?

Can you confirm this problem using psql?

> There are 6 rows in the table (given that size, I assumed that an
> index was not necessary).

That's a reasonable assumption.

-Neil


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

Предыдущее
От: Josh Berkus
Дата:
Сообщение: Re: Wierd context-switching issue on Xeon
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Impossibly slow DELETEs