Re: descending Indexes

From: Christopher Browne <cbbrowne(at)acm(dot)org>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: descending Indexes
Date: 2003-09-05 01:40:31
Message-ID: m3smnc3tdc.fsf@chvatal.cbbrowne.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

A long time ago, in a galaxy far, far away, "Relaxin" <noname(at)spam(dot)com> wrote:
> Yes, I really *need* a descending index.
>
> How do you do a backward scan on an index?

Normally, your query would look like:

"... order by field14 descending;"

That will scan backwards based on the index, assuming that the
optimizer decided to use an index on field14.
--
let name="cbbrowne" and tld="cbbrowne.com" in String.concat "@" [name;tld];;
http://www.ntlug.org/~cbbrowne/oses.html
"What this list needs is a good five-dollar plasma weapon."
--paraphrased from `/usr/bin/fortune`

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jan Wieck 2003-09-05 02:38:41 Re: Replaceing records
Previous Message Relaxin 2003-09-05 01:24:01 Re: descending Indexes