From: Tom Lane <tgl@sss.pgh.pa.us>
To: Junaili Lie <junaili@gmail.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: slow deletes on pgsql 7.4
Date: Tue, 25 Apr 2006 19:09:18 -0400
Message-ID: <9147.1146006558@sss.pgh.pa.us> (raw)
In-Reply-To: <8d04ce990604251441ya85c42evb47946272536cabe@mail.gmail.com>
References: <8d04ce990604251441ya85c42evb47946272536cabe@mail.gmail.com>
"Junaili Lie" <junaili@gmail.com> writes:
> we encounter issues when deleting from a table based on id (primary key). O=
> n
> certain 'id', it took forever to delete and the i/o is 100% busy.
Almost always, if delete is slow when selecting the same rows is fast,
it's because you've got a trigger performance problem --- most commonly,
there are foreign keys referencing this table from other tables and you
don't have the referencing columns indexed.
regards, tom lane
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: tgl@sss.pgh.pa.us, junaili@gmail.com
Subject: Re: slow deletes on pgsql 7.4
In-Reply-To: <9147.1146006558@sss.pgh.pa.us>
* 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