Re: 50K record DELETE Begins, 100% CPU, Never Completes 1 hour later - Mailing list pgsql-general

From Tom Lane
Subject Re: 50K record DELETE Begins, 100% CPU, Never Completes 1 hour later
Date
Msg-id 22476.1063258339@sss.pgh.pa.us
Whole thread Raw
In response to 50K record DELETE Begins, 100% CPU, Never Completes 1 hour later  ("Clay Luther" <claycle@cisco.com>)
List pgsql-general
"Clay Luther" <claycle@cisco.com> writes:
> ccm=# explain delete from numplan where pkid in (select numplan.pkid from numplan left outer join pilothuntgroup on
numplan.pkid=pilothuntgroup.fknumplanleft outer join devicenumplanmap on numplan.pkid = devicenumplanmap.fknumplan
wherenumplan.tkpatternusage=2 and pilothuntgroup.fknumplan is null and devicenumplanmap.fknumplan is null); 

The left join/is null thingies look like a workaround for our pre-7.4
lack of performance with NOT IN queries.  Have you tried expressing
this more straightforwardly with NOT IN?

Also, what sort_mem setting are you using?

            regards, tom lane

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: A Question About Insertions -- Performance
Next
From: "Jules Alberts"
Date:
Subject: Re: help with TCL function