Skip site navigation (1) Skip section navigation (2)

Re: Automatic optimization of IN clauses via INNER JOIN

From: Grzegorz Jaśkiewicz <gryzman(at)gmail(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Craig Ringer <craig(at)postnewspapers(dot)com(dot)au>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Thomas Hamilton <thomashamilton76(at)yahoo(dot)com>, pgsql-performance(at)postgresql(dot)org
Subject: Re: Automatic optimization of IN clauses via INNER JOIN
Date: 2009-12-18 15:24:46
Message-ID: 2f4958ff0912180724t58940a36q1770df3609b38f1d@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-performance
2009/12/18 Robert Haas <robertmhaas(at)gmail(dot)com>:
> 2009/12/18 Grzegorz Jaśkiewicz <gryzman(at)gmail(dot)com>:
>> On Fri, Dec 18, 2009 at 2:18 PM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
>>
>>> NOT IN is the only that really kills you as far as optimization is
>>> concerned.  IN can be transformed to a join.  NOT IN forces a NOT
>>> (subplan)-type plan, which bites - hard.
>>
>> in a well designed database (read: not abusing NULLs) - it can be done
>> with joins too.
>
> But not by PostgreSQL, or so I believe.

using left join ?



-- 
GJ

In response to

Responses

pgsql-performance by date

Next:From: Michael N. MikhulyaDate: 2009-12-18 15:44:41
Subject: Idea how to get rid of Bitmap Heap Scan
Previous:From: Robert HaasDate: 2009-12-18 15:23:29
Subject: Re: Automatic optimization of IN clauses via INNER JOIN

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group