Re: Multicolumn indexes and ORDER BY

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Multicolumn indexes and ORDER BY
Дата
Msg-id 21892.1087396355@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Multicolumn indexes and ORDER BY  (Jernej Kos <kostko@jweb-network.net>)
Список pgsql-general
Jernej Kos <kostko@jweb-network.net> writes:
> Yes i tried that already - and as you said, it works. But i need to have one
> column sorted DESC and one ASC. Is there any way this could be done ?

Not easily.  You could look into building a "reverse sort" operator
class for one index column or the other.  There is discussion of how
to do this in the archives, but I don't know of anyone having actually
gotten off their duff and done it.  For reasonable index performance
this would require writing at least one function in C (a pretty trivial
one, but nonetheless a C function).

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: 7.4 performance issue
Следующее
От: Stephan Szabo
Дата:
Сообщение: Re: reference to a view