Re: Impossibly slow DELETEs - Mailing list pgsql-performance

From Neil Conway
Subject Re: Impossibly slow DELETEs
Date
Msg-id 87znekuhoq.fsf@mailbox.samurai.com
Whole thread Raw
In response to Impossibly slow DELETEs  (Stefan Champailler <schampailler@easynet.be>)
Responses Re: Impossibly slow DELETEs
Re: Impossibly slow DELETEs
List 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 by date:

Previous
From: Josh Berkus
Date:
Subject: Re: Wierd context-switching issue on Xeon
Next
From: Tom Lane
Date:
Subject: Re: Impossibly slow DELETEs