Re: 50K record DELETE Begins, 100% CPU, Never Completes 1 hour later

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Clay Luther" <claycle(at)cisco(dot)com>
Cc: "Pgsql-General (E-mail)" <pgsql-general(at)postgresql(dot)org>
Subject: Re: 50K record DELETE Begins, 100% CPU, Never Completes 1 hour later
Date: 2003-09-11 05:32:19
Message-ID: 22476.1063258339@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Clay Luther" <claycle(at)cisco(dot)com> writes:
> ccm=# explain delete from numplan where pkid in (select numplan.pkid from numplan left outer join pilothuntgroup on numplan.pkid=pilothuntgroup.fknumplan left outer join devicenumplanmap on numplan.pkid = devicenumplanmap.fknumplan where numplan.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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jules Alberts 2003-09-11 06:59:55 Re: help with TCL function
Previous Message Tom Lane 2003-09-11 05:24:54 Re: A Question About Insertions -- Performance