Re: IN vs EXIIST - Mailing list pgsql-general

From Andrew Sullivan
Subject Re: IN vs EXIIST
Date
Msg-id 20020919084037.C326@mail.libertyrms.com
Whole thread Raw
In response to Re: IN vs EXIIST  (Jean-Christian Imbeault <jc@mega-bucks.co.jp>)
List pgsql-general
On Thu, Sep 19, 2002 at 06:36:56PM +0900, Jean-Christian Imbeault wrote:
>
> Maybe EXISTS is not always faster than IN ?

I haven't been reading this thread very carefully, but that one is
_certainly_ true.  In testing, we have had a wide variety of results
with IN versus EXISTS.  It seems to have to do with the relative size
of the two sides.  I haven't come up with a perfect rule for deciding
yet.

NOT IN/NOT EXISTS is more often a clear-cut case: NOT EXISTS is
_almost_ (but only almost) always faster.

A

--
----
Andrew Sullivan                         204-4141 Yonge Street
Liberty RMS                           Toronto, Ontario Canada
<andrew@libertyrms.info>                              M2P 2A8
                                         +1 416 646 3304 x110


pgsql-general by date:

Previous
From: Christoph Dalitz
Date:
Subject: NUMERIC and arithmetics
Next
From: Chris Bowlby
Date:
Subject: array issue....