| От | 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 по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера