Re: IN vs EXIIST

From: Andrew Sullivan <andrew(at)libertyrms(dot)info>
To: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: IN vs EXIIST
Date: 2002-09-19 12:40:37
Message-ID: 20020919084037.C326@mail.libertyrms.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)libertyrms(dot)info> M2P 2A8
+1 416 646 3304 x110

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Martijn van Oosterhout 2002-09-19 12:57:28 Re: NUMERIC and arithmetics
Previous Message Chris Bowlby 2002-09-19 12:37:56 array issue....