Re: Really slow UPDATE and DELETE

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Nicholas Piper <nick(at)nickpiper(dot)co(dot)uk>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Really slow UPDATE and DELETE
Date: 2001-07-31 20:37:46
Message-ID: 24755.996611866@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Nicholas Piper <nick(at)nickpiper(dot)co(dot)uk> writes:
> Inserts and selects on this table are really fast with indexes, and
> pretty fast without.
> The problem I'm having is that UPDATES and DELETEs are really, really
> slow.

I'm guessing that you have other tables that have foreign-key references
to this one. The performance problem comes from searching those tables
to see if they have any keys that would become dangling references after
the update or delete. You need to look at whether the queries used by
the FK triggers are properly indexed or not.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message chris markiewicz 2001-07-31 20:42:08 RE: Large Objects
Previous Message Tom Lane 2001-07-31 20:31:27 Re: Unexpected *ABORT STATE*