Re: Automatic optimization of IN clauses via INNER JOIN

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Automatic optimization of IN clauses via INNER JOIN
Дата
Msg-id 2106.1261063973@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Automatic optimization of IN clauses via INNER JOIN  (Thomas Hamilton <thomashamilton76@yahoo.com>)
Ответы Re: Automatic optimization of IN clauses via INNER JOIN  (Thomas Hamilton <thomashamilton76@yahoo.com>)
Список pgsql-performance
Thomas Hamilton <thomashamilton76@yahoo.com> writes:
> Apparently the latest version of MySQL has solved this problem:
http://www.xaprb.com/blog/2006/06/28/why-large-in-clauses-are-problematic/
> But I am running PostgreSQL v8.3 and am observing generally that SELECT ... WHERE ... IN (a, b, c, ...) is much
slowerthan SELECT ... INNER JOIN (SELECT a UNION ALL�SELECT b UNION ALL SELECT c ...) 

> Why doesn't the optimizer automatically transform IN clauses to INNER JOINs in this fashion?

Did you read all the comments on that three-year-old article?

            regards, tom lane

В списке pgsql-performance по дате отправления:

Предыдущее
От: Thomas Hamilton
Дата:
Сообщение: Automatic optimization of IN clauses via INNER JOIN
Следующее
От: Thomas Hamilton
Дата:
Сообщение: Re: Automatic optimization of IN clauses via INNER JOIN