From: Tom Lane <tgl@sss.pgh.pa.us>
To: Ralph Mason <ralph.mason@telogis.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Index Usage using IN
Date: Wed, 01 Feb 2006 15:41:09 -0500
Message-ID: <4387.1138826469@sss.pgh.pa.us> (raw)
In-Reply-To: <1138825370.8376.5.camel@toonses.gghcwest.com>
References: <43E1164B.7020104@telogis.com>
<1138825370.8376.5.camel@toonses.gghcwest.com>
"Jeffrey W. Baker" <jwbaker@acm.org> writes:
> On Thu, 2006-02-02 at 09:12 +1300, Ralph Mason wrote:
>> Select ID from TableA where ID not IN ( Select ID from Table B)
> Have you considered this:
> SELECT ID from TableA EXCEPT Select ID from Table B
Also, increasing work_mem might persuade the planner to try a hashed
subplan, which'd be a lot better than what you have. Note that it's
quite unlikely that indexes are going to help for this.
regards, tom lane
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: tgl@sss.pgh.pa.us, ralph.mason@telogis.com
Subject: Re: Index Usage using IN
In-Reply-To: <4387.1138826469@sss.pgh.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