Re: Can Postgres use an INDEX over an OR?

Поиск
Список
Период
Сортировка
От Віталій Тимчишин
Тема Re: Can Postgres use an INDEX over an OR?
Дата
Msg-id 331e40660907192318t607eb913p520f531f3d65037e@mail.gmail.com
обсуждение исходный текст
Ответ на Can Postgres use an INDEX over an OR?  (Robert James <srobertjames@gmail.com>)
Ответы Re: Can Postgres use an INDEX over an OR?
Список pgsql-performance


2009/7/20 Robert James <srobertjames@gmail.com>

Hi. I notice that when I do a WHERE x, Postgres uses an index, and when I do WHERE y, it does so as well, but when I do WHERE x OR y, it doesn't. Why is this so?

It's not clever enough.

And how can I shut this off?

Use UNION/UNION ALL if possible in your case.

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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: Fastest char datatype
Следующее
От: Chris
Дата:
Сообщение: Re: Can Postgres use an INDEX over an OR?