Re: Ascending / Descending Indexes

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Michael Gould <mgould(at)intermodalsoftwaresolutions(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Ascending / Descending Indexes
Date: 2009-07-14 13:49:41
Message-ID: 20090714134941.GA4799@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Michael Gould wrote:
> In some SQL engines the engine doesn't need to define both Ascending and
> Descending indexes on the same column.  Does Postgres need to have indexes
> defined for both Ascending and Descending sorts?  We use quite a few of
> these types of sorts.

A single btree index can be used for both cases. (Unless you want some
columns ascending and other columns descending, in which case you need
to work extra.)

--
Alvaro Herrera http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Alvaro Herrera 2009-07-14 13:52:29 Re: Best practices for moving UTF8 databases
Previous Message Michael Gould 2009-07-14 13:30:45 Ascending / Descending Indexes