Re: Where clause efficiency using "IN"

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Where clause efficiency using "IN"
Дата
Msg-id 7532.1098460596@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Where clause efficiency using "IN"  (Sean Davis <sdavis2@mail.nih.gov>)
Список pgsql-novice
Sean Davis <sdavis2@mail.nih.gov> writes:
> Just a quick general question:  Can someone comment on using where
> clauses like:
>    (sample = 2 OR sample = 3 OR sample = 4)
> as compared to
>    sample in (2,3,4)
> in terms of efficiency?

PG's parser expands the latter into the former, so there's no difference
for us.  This is probably not true on other DBMSes.

            regards, tom lane

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

Предыдущее
От: Sean Davis
Дата:
Сообщение: Where clause efficiency using "IN"
Следующее
От: Steven Klassen
Дата:
Сообщение: Re: Where clause efficiency using "IN"