From: Bruce Momjian <pgman@candle.pha.pa.us>
To: Rajesh Kumar Mallah <mallah@trade-india.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: IN surpasses NOT EXISTS in 7.4RC2 ??
Date: Thu, 13 Nov 2003 09:56:57 -0500 (EST)
Message-ID: <200311131456.hADEuv409079@candle.pha.pa.us> (raw)
In-Reply-To: <200311131323.39762.mallah@trade-india.com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: pgman@candle.pha.pa.us, mallah@trade-india.com
Subject: Re: IN surpasses NOT EXISTS in 7.4RC2 ??
In-Reply-To: <200311131456.hADEuv409079@candle.pha.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox