Re: Query plan for NOT IN - Mailing list pgsql-performance

From Grzegorz Jaśkiewicz
Subject Re: Query plan for NOT IN
Date
Msg-id 2f4958ff0910050706y1c43b8fn2fbcd348f44e9072@mail.gmail.com
Whole thread Raw
In response to Re: Query plan for NOT IN  (Matthew Wakeling <matthew@flymine.org>)
Responses Re: Query plan for NOT IN
List pgsql-performance
2009/10/5 Matthew Wakeling <matthew@flymine.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

pgsql-performance by date:

Previous
From: Matthew Wakeling
Date:
Subject: Re: Query plan for NOT IN
Next
From: Tom Lane
Date:
Subject: Re: Query plan for NOT IN