Re: IN surpasses NOT EXISTS in 7.4RC2 ?? - Mailing list pgsql-performance

From Bruce Momjian
Subject Re: IN surpasses NOT EXISTS in 7.4RC2 ??
Date
Msg-id 200311131456.hADEuv409079@candle.pha.pa.us
Whole thread Raw
In response to IN surpasses NOT EXISTS in 7.4RC2 ??  (Rajesh Kumar Mallah <mallah@trade-india.com>)
List pgsql-performance
Rajesh Kumar Mallah wrote:
>
> Hi,
>
> NOT EXISTS is taking almost double time than NOT IN .
> I know IN has been optimised in 7.4 but is anything
> wrong with the NOT EXISTS?
>
> I have vaccumed , analyze and run the query many times
> still not in is faster than exists :>

Seems fine.  In 7.4, NOT IN will often be faster that NOT EXISTS.  NOT
EXISTS didn't change --- there are restrictions on how far we can
optimize NOT EXISTS.  NOT IN has just become much faster in 7.4.

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

pgsql-performance by date:

Previous
From: Robert Treat
Date:
Subject: Re: Value of Quad vs. Dual Processor machine
Next
From: Rajesh Kumar Mallah
Date:
Subject: Re: IN surpasses NOT EXISTS in 7.4RC2 ??