Re: Very slow DELETE on 4000 rows of 55000 row table - Mailing list pgsql-sql

From Tom Lane
Subject Re: Very slow DELETE on 4000 rows of 55000 row table
Date
Msg-id 19114.1175750630@sss.pgh.pa.us
Whole thread Raw
In response to Re: Very slow DELETE on 4000 rows of 55000 row table  (Richard Broersma Jr <rabroersma@yahoo.com>)
List pgsql-sql
Richard Broersma Jr <rabroersma@yahoo.com> 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 particular operation which happens every few
>> months, if that.

> true, but without an index, it still has to scan the table just to be sure.

If this is only a once-in-awhile thing, maybe you could build the index,
do the deletes, drop the index ...
        regards, tom lane


pgsql-sql by date:

Previous
From: "A. Kretschmer"
Date:
Subject: Re: slow query
Next
From: Tom Lane
Date:
Subject: Re: slow query