Re: TimeOf(Subselects|Joins)FromLargeTables?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: TimeOf(Subselects|Joins)FromLargeTables?
Дата
Msg-id 15079.1086411353@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: TimeOf(Subselects|Joins)FromLargeTables?  ("Dann Corbit" <DCorbit@connx.com>)
Список pgsql-hackers
"Dann Corbit" <DCorbit@connx.com> writes:
> I think ... an in-list is going to do better than a list of constants
> separated by OR.

Right at the moment, there is no performance difference betweenWHERE foo IN (const1, const2, const3)
andWHERE foo = const1 OR foo = const2 OR foo = const3
because in fact the parser expands the former into the latter at
a pretty early stage.

Still, I'd suggest using the IN form when you can.  It's more
concise, arguably less prone to typos, and someday we might even
implement it more efficiently than the other form.
        regards, tom lane


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

Предыдущее
От: Lamar Owen
Дата:
Сообщение: Re: Official Freeze Date for 7.5: July 1st, 2004
Следующее
От: David Garamond
Дата:
Сообщение: Re: [pgsql-advocacy] Not 7.5, but 8.0 ?