Skip site navigation (1) Skip section navigation (2)

Re: index: specify sort order?

From: Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com>
To: me(at)alternize(dot)com
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: index: specify sort order?
Date: 2005-08-27 18:03:16
Message-ID: 20050827110024.U79402@megazone.bigpanda.com (view raw or flat)
Thread:
Lists: pgsql-novice
On Sat, 27 Aug 2005 me(at)alternize(dot)com wrote:

> yes, analyze is showing "index scan backwards". so for pg-sql it does not
> make a difference in speed whether "index scan" is done forward/backward?
> cool! in mssql it did make quite a difference to specify the prefered index
> sort order, hence my question.

Well, there is a case in PostgreSQL where it matters, which is in
multi-column indexes where you want different directions for different
columns (like col1 asc, col2 desc, col3 asc).  If you need this, you can
currently simulate it with special operator classes (searching the
archives for reverse opclass or reverse operator class should give more
information).

> before i annoy the list with other migration-related, obvious questions, is
> there a good documentation on migrating from mssql to pgsql?

I don't know of one off hand (although there might be something on
techdocs.postgresql.org), but hopefully someone else will chime in if they
know of something specific.

In response to

pgsql-novice by date

Next:From: Dane EnsignDate: 2005-08-27 21:11:18
Subject: pgdata, pg_ctl wont start
Previous:From: meDate: 2005-08-27 16:25:29
Subject: Re: index: specify sort order?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group