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