Re: Fwd: Index on table when using DESC clause

Поиск
Список
Период
Сортировка
От Steinar H. Gunderson
Тема Re: Fwd: Index on table when using DESC clause
Дата
Msg-id 20050523180352.GA23486@uio.no
обсуждение исходный текст
Ответ на Fwd: Index on table when using DESC clause  (Yves Vindevogel <yves.vindevogel@implements.be>)
Ответы Re: Fwd: Index on table when using DESC clause  (Yves Vindevogel <yves.vindevogel@implements.be>)
Список pgsql-performance
On Mon, May 23, 2005 at 07:41:19PM +0200, Yves Vindevogel wrote:
> However, when I query my db using for instance   order by pages,
> documentname, it is very fast.
> If I use   order by pages desc, documentname, it is not fast at
> all, like it is not using the index properly at all.

Make an index on "pages desc, documentname asc".

/* Steinar */
--
Homepage: http://www.sesse.net/

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

Предыдущее
От: Yves Vindevogel
Дата:
Сообщение: Fwd: Index on table when using DESC clause
Следующее
От: Yves Vindevogel
Дата:
Сообщение: Re: Fwd: Index on table when using DESC clause