Re: Query plan for NOT IN

From: Grzegorz Jaśkiewicz <gryzman(at)gmail(dot)com>
To: Matthew Wakeling <matthew(at)flymine(dot)org>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Query plan for NOT IN
Date: 2009-10-05 14:06:41
Message-ID: 2f4958ff0910050706y1c43b8fn2fbcd348f44e9072@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

2009/10/5 Matthew Wakeling <matthew(at)flymine(dot)org>

>
> Yes, that does work, but only because id is NOT NULL. I thought Postgres
> 8.4 had had a load of these join types unified to make it less important how
> the query is written?
>

well, as a rule of thumb - unless you can't think of a default value of
column - don't use nulls. So using nulls as default 'idunno' - is a bad
practice, but everybody's opinion on that differ.

But back on a subject, postgresql is very very poor performance wise with
[NOT] IN () type of constructs. So if you can, avoid them, and learn to use
joins.

--
GJ

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2009-10-05 14:30:36 Re: Query plan for NOT IN
Previous Message Matthew Wakeling 2009-10-05 13:59:59 Re: Query plan for NOT IN