Re: index suggestion for 7.4

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: index suggestion for 7.4
Дата
Msg-id 10518.1054315959@sss.pgh.pa.us
обсуждение исходный текст
Ответ на index suggestion for 7.4  (Bruno Wolff III <bruno@wolff.to>)
Список pgsql-hackers
Bruno Wolff III <bruno@wolff.to> writes:
> Now that expressions can be used in indexes in 7.4 you can have multicolumn
> indexes that are ordered in different directions. However the planner
> doesn't seem to understand that order by -col asc is the same as order by
> col desc (for at least the normal -)

I don't think it should; that's an extremely datatype-dependent bit of
analysis, and the planner does not have any means of ascertaining
whether the equivalency holds for a particular "-" operator and index
opclass.

The correct way to set up this sort of thing would be to build a
"backwards ordering" operator class, not to use an index on "-col".
        regards, tom lane


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

Предыдущее
От: Jeff
Дата:
Сообщение: Re: Practical sets of SQLSTATE values?
Следующее
От: Stephan Szabo
Дата:
Сообщение: Re: index suggestion for 7.4