Re: Can Postgres use an INDEX over an OR?

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


27 липня 2009 р. 15:02 Robert Haas <robertmhaas@gmail.com> написав:

The problem, though, is that it won't ALWAYS be right to implement OR
using UNION, so you have to have some way of deciding which is better.

That's easy - you propose both ways to planner and it's up to it to decide. Yes, it can decide wrong way, but we are returning to statistics problem. At least one can tune costs and enable_ settings. Now one have to rewrite query that may be not possible/too complex.

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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: Can Postgres use an INDEX over an OR?
Следующее
От: Scott Marlowe
Дата:
Сообщение: Re: More speed counting rows