Re: Fwd: Index on table when using DESC clause

From: "Steinar H(dot) Gunderson" <sgunderson(at)bigfoot(dot)com>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: Fwd: Index on table when using DESC clause
Date: 2005-05-23 18:03:52
Message-ID: 20050523180352.GA23486@uio.no
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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/

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Yves Vindevogel 2005-05-23 19:02:17 Re: Fwd: Index on table when using DESC clause
Previous Message Yves Vindevogel 2005-05-23 17:41:19 Fwd: Index on table when using DESC clause