Re: "IN" or "=" and "OR"

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: "IN" or "=" and "OR"
Дата
Msg-id 25121.1042344653@sss.pgh.pa.us
обсуждение исходный текст
Ответ на "IN" or "=" and "OR"  (Vernon Wu <vernonw@gatewaytech.com>)
Список pgsql-performance
Vernon Wu <vernonw@gatewaytech.com> writes:
> Which query statement is better in terms of preformance ?
> select ... from table1 where field1 in  ('a', 'b', 'c')
> select ... from table1 where field1='a' or field1='b' or field1='c'

There is no difference, other than the microseconds the parser spends
transforming form 1 into form 2 ...

            regards, tom lane

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

Предыдущее
От: Neil Conway
Дата:
Сообщение: Re: join over 12 tables takes 3 secs to plan
Следующее
От: "Charles H. Woloszynski"
Дата:
Сообщение: Re: join over 12 tables takes 3 secs to plan