From: Kevin Grittner <Kevin.Grittner@wicourts.gov>
To: Scott Marlowe <scott.marlowe@gmail.com>
To: Oliveiros d'Azevedo Cristina <oliveiros.cristina@marktest.pt>
To: Jonathan Hoover <jhoover@yahoo-inc.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: Get Postgres to use multiple proc cores?
Date: Fri, 05 Nov 2010 11:08:40 -0500
Message-ID: <4CD3E5B8020000250003735A@gw.wicourts.gov> (raw)
In-Reply-To: <7B7990F174D348D28AA43F21640F5EAE@marktestcr.marktest.pt>
References: <68C107706843A54BA7D9CAEF123ADF05010346C955@SP2-EX07VS03.ds.corp.yahoo.com>
<AANLkTimU++2xbWzLeNxjVuA44Egwyb9WGa+1M7VnEYEN@mail.gmail.com>
<7B7990F174D348D28AA43F21640F5EAE@marktestcr.marktest.pt>
"Oliveiros d'Azevedo Cristina" <oliveiros.cristina@marktest.pt>
wrote:
> What is faster? A JOIN or a WHERE a IN (SELECT ... )
On 8.4 and later an EXISTS or NOT EXISTS will use semi-join or
anti-join (respectively). These should usually be much faster than
the IN (SELECT DISTINCT ... ) technique. Be careful of the
difference in semantics between NOT EXISTS and NOT IN if any of the
columns involved in the matching can be null -- they are *not* the
same thing.
-Kevin
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-admin@postgresql.org
Cc: Kevin.Grittner@wicourts.gov, scott.marlowe@gmail.com, oliveiros.cristina@marktest.pt, jhoover@yahoo-inc.com
Subject: Re: Get Postgres to use multiple proc cores?
In-Reply-To: <4CD3E5B8020000250003735A@gw.wicourts.gov>
* 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