Automatic optimization of IN clauses via INNER JOIN

Поиск
Список
Период
Сортировка
От Thomas Hamilton
Тема Automatic optimization of IN clauses via INNER JOIN
Дата
Msg-id 293252.2824.qm@web45814.mail.sp1.yahoo.com
обсуждение исходный текст
Ответы Re: Automatic optimization of IN clauses via INNER JOIN  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Automatic optimization of IN clauses via INNER JOIN  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-performance
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 slower
thanSELECT ... 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?





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

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: Re: Parallel Function calls using multiple processes
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Automatic optimization of IN clauses via INNER JOIN