Re: Query plan for NOT IN
| От | Grzegorz Jaśkiewicz |
|---|---|
| Тема | Re: Query plan for NOT IN |
| Дата | |
| Msg-id | 2f4958ff0910050706y1c43b8fn2fbcd348f44e9072@mail.gmail.com обсуждение исходный текст |
| Ответ на | Re: Query plan for NOT IN (Matthew Wakeling <matthew@flymine.org>) |
| Ответы |
Re: Query plan for NOT IN
|
| Список | pgsql-performance |
2009/10/5 Matthew Wakeling <matthew@flymine.org>
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
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 по дате отправления: