"Clay Luther" <[EMAIL PROTECTED]> 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

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
      joining column's datatypes do not match

Reply via email to