Re: descending Indexes - Mailing list pgsql-general

From Christopher Browne
Subject Re: descending Indexes
Date
Msg-id m3smnc3tdc.fsf@chvatal.cbbrowne.com
Whole thread Raw
In response to Re: descending Indexes  (Stephan Szabo <sszabo@megazone.bigpanda.com>)
List pgsql-general
A long time ago, in a galaxy far, far away, "Relaxin" <noname@spam.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`

pgsql-general by date:

Previous
From: "Relaxin"
Date:
Subject: Re: descending Indexes
Next
From: Richard Huxton
Date:
Subject: Re: [HACKERS] Question about Scripting in Postgresql.