Re: multicolumn index column order

From: valgog <valgog(at)gmail(dot)com>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: multicolumn index column order
Date: 2007-07-25 08:34:00
Message-ID: 1185352440.504985.282370@19g2000hsx.googlegroups.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Jul 25, 2:14 am, Lew <l(dot)(dot)(dot)(at)lewscanon(dot)nospam> wrote:
>
> How about two indexes, one on each column? Then the indexes will cooperate
> when combined in a WHERE clause.
> <http://www.postgresql.org/docs/8.2/interactive/indexes-bitmap-scans.html>
>
> I don't believe the index makes a semantic difference with regard to ascending
> or descending. An index is used to locate records in the selection phase of a
> query or modification command.
>
> --
> Lew

Ordered indexes (b-tree in this case) are also used to get the needed
record order and it is absolutely not necessary to have a WHARE clause
in your select statement to use them when you are using ORDER BY.

--
Valentine

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Dave Page 2007-07-25 08:59:54 Re: Table Statistics with pgAdmin III
Previous Message Gregory Stark 2007-07-25 07:58:40 Re: Performance issue with 8.2.3 - "C" application