From: Neil Conway <neilc@samurai.com>
To: schampailler@easynet.be
Cc: pgsql-performance@postgresql.org
Subject: Re: Impossibly slow DELETEs
Date: Tue, 25 Nov 2003 18:55:33 -0500
Message-ID: <87znekuhoq.fsf@mailbox.samurai.com> (raw)
In-Reply-To: <200311252256.56433.schampailler@easynet.be>
References: <200311252256.56433.schampailler@easynet.be>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: neilc@samurai.com, schampailler@easynet.be
Subject: Re: Impossibly slow DELETEs
In-Reply-To: <87znekuhoq.fsf@mailbox.samurai.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox