Re: Really slow UPDATE and DELETE - Mailing list pgsql-general

From Tom Lane
Subject Re: Really slow UPDATE and DELETE
Date
Msg-id 24755.996611866@sss.pgh.pa.us
Whole thread Raw
In response to Really slow UPDATE and DELETE  (Nicholas Piper <nick@nickpiper.co.uk>)
Responses Re: Really slow UPDATE and DELETE  (Nicholas Piper <nick@nickpiper.co.uk>)
List pgsql-general
Nicholas Piper <nick@nickpiper.co.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

pgsql-general by date:

Previous
From: Joel Burton
Date:
Subject: Re: Connecting Ultradev on Win2k to PostgreSQL on Red Hat Linux
Next
From: wsheldah@lexmark.com
Date:
Subject: Re: Unexpected *ABORT STATE*