Re: [PERFORM] Slow deleting tables with foreign keys

2011-04-25 Thread Robert Haas
On Wed, Mar 30, 2011 at 10:16 PM, Jeremy Palmer wrote: > Hi All, > > I'm trying to delete one row from a table and it's taking an extremely long > time. This parent table is referenced by other table's foreign keys, but the > particular row I'm trying to delete is not referenced any other rows i

Re: [PERFORM] Slow deleting tables with foreign keys

2011-03-31 Thread Jeremy Palmer
Jeremy Palmer Subject: Re: [PERFORM] Slow deleting tables with foreign keys Jeremy, Does table_revision have a unique index on id? Also, I doubt these two indexes ever get used: CREATE INDEX idx_crs_action_expired_created ON table_version.bde_crs_action_revision USING btree (_revision_e

Re: [PERFORM] Slow deleting tables with foreign keys

2011-03-31 Thread Bob Lunney
table_version.bde_crs_action_revision USING btree (_revision_expired, audit_id); Bob Lunney --- On Wed, 3/30/11, Jeremy Palmer wrote: > From: Jeremy Palmer > Subject: [PERFORM] Slow deleting tables with foreign keys > To: "pgsql-performance@postgresql.org" > Date: Wed

[PERFORM] Slow deleting tables with foreign keys

2011-03-30 Thread Jeremy Palmer
Hi All, I'm trying to delete one row from a table and it's taking an extremely long time. This parent table is referenced by other table's foreign keys, but the particular row I'm trying to delete is not referenced any other rows in the associative tables. This table has the following structure