From: Steinar H. Gunderson <sgunderson@bigfoot.com>
To: pgsql-performance@postgresql.org
Subject: Re: Fwd: Index on table when using DESC clause
Date: Mon, 23 May 2005 20:03:52 +0200
Message-ID: <20050523180352.GA23486@uio.no> (raw)
In-Reply-To: <6d31bed04ab35cbbe2df37af979d9882@implements.be>
References: <6d31bed04ab35cbbe2df37af979d9882@implements.be>
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/
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: sgunderson@bigfoot.com
Subject: Re: Fwd: Index on table when using DESC clause
In-Reply-To: <20050523180352.GA23486@uio.no>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox