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 jpal...@linz.govt.nz 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

Re: [PERFORM] Slow deleting tables with foreign keys

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

Re: [PERFORM] Slow deleting tables with foreign keys

2011-03-31 Thread Jeremy Palmer
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_expired, _revision_created); CREATE INDEX

[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