Re: [SQL] Very slow DELETE on 4000 rows of 55000 row table

2007-04-04 Thread Tom Lane
Richard Broersma Jr <[EMAIL PROTECTED]> writes: >> But I DELETE all conflicting those rows prior to the slow DELETE, just >> so the FK check is never hit. Should I be looking at subverting the FK >> check mechanism somehow? The necessary index would be huge, and >> relevant only on this particula

Re: [SQL] Very slow DELETE on 4000 rows of 55000 row table

2007-04-04 Thread Richard Broersma Jr
> But I DELETE all conflicting those rows prior to the slow DELETE, just > so the FK check is never hit. Should I be looking at subverting the FK > check mechanism somehow? The necessary index would be huge, and > relevant only on this particular operation which happens every few > months, if tha

Re: [SQL] Very slow DELETE on 4000 rows of 55000 row table

2007-04-04 Thread Bryce Nesbitt
Tom Lane wrote: > Bryce Nesbitt <[EMAIL PROTECTED]> writes: > >> I've got a DELETE FROM that seems to run forever, pegging the CPU at >> 100%. I can't figure out why it's slow. Any clues? >> > > Unindexed foreign key constraints pointing to this table, perhaps? > EXPLAIN ANALYZE would giv

Re: [SQL] Very slow DELETE on 4000 rows of 55000 row table

2007-04-03 Thread Tom Lane
Bryce Nesbitt <[EMAIL PROTECTED]> writes: > I've got a DELETE FROM that seems to run forever, pegging the CPU at > 100%. I can't figure out why it's slow. Any clues? Unindexed foreign key constraints pointing to this table, perhaps? EXPLAIN ANALYZE would give a great deal more clue than plain EX