Re: index in desc order

From: Michal Politowski <mpol+pg(at)meep(dot)pl>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: index in desc order
Date: 2010-11-02 14:21:57
Message-ID: 20101102142157.GA12638@meep.pl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, 2 Nov 2010 10:10:19 -0400, Tom Lane wrote:
> Szymon Guz <mabewlun(at)gmail(dot)com> writes:
> > On 2 November 2010 10:36, AI Rumman <rummandba(at)gmail(dot)com> wrote:
> >> Is it possible to create an index in descending order?
>
> > create index i on t(i desc);
>
> Note that there is actually no point at all in such a declaration.
> The planner is perfectly capable of using backwards indexscans at
> need, so the above index doesn't do anything you couldn't do with
> a regular ascending-order index.

Cannot there be a (system/hardware) setup where there is a perceptible
performance difference between forward and backward index scans?

--
Michał Politowski
Talking has been known to lead to communication if practiced carelessly.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bill Reynolds 2010-11-02 14:40:21 Group by and lmit
Previous Message Jonathan Tripathy 2010-11-02 14:20:54 Re: Replication