pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: valgog <valgog@gmail.com>
To: pgsql-performance@postgresql.org
Subject: Re: multicolumn index column order
Date: Wed, 25 Jul 2007 08:34:00 -0000
Message-ID: <1185352440.504985.282370@19g2000hsx.googlegroups.com> (raw)
In-Reply-To: <ZcadnVxk8I9ICDvbnZ2dnUVZ_gidnZ2d@comcast.com>
References: <200707240710.l6O7AUu24090@pillette.com>
	<3ce9822f0707240040o2f358155p7ff7537bbe986209@mail.gmail.com>
	<ZcadnVxk8I9ICDvbnZ2dnUVZ_gidnZ2d@comcast.com>

On Jul 25, 2:14 am, Lew <l...@lewscanon.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




view thread (7+ messages)  latest in thread

Message-ID: <1185352440.504985.282370@19g2000hsx.googlegroups.com>
Permalink:  ../1185352440.504985.282370@19g2000hsx.googlegroups.com/
Also on:    postgresql.org/message-id/1185352440.504985.282370@19g2000hsx.googlegroups.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-performance@postgresql.org
  Cc: valgog@gmail.com
  Subject: Re: multicolumn index column order
  In-Reply-To: <1185352440.504985.282370@19g2000hsx.googlegroups.com>
  References: <200707240710.l6O7AUu24090@pillette.com> <3ce9822f0707240040o2f358155p7ff7537bbe986209@mail.gmail.com> <ZcadnVxk8I9ICDvbnZ2dnUVZ_gidnZ2d@comcast.com> <1185352440.504985.282370@19g2000hsx.googlegroups.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox