Re: different sort order for primary key index

From: Grzegorz Jaśkiewicz <gryzman(at)gmail(dot)com>
To: Paul Hartley <phartley(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: different sort order for primary key index
Date: 2009-10-14 13:16:30
Message-ID: 2f4958ff0910140616s68c5325cwe4e954cdee759b21@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

there are certain conditions where PK is required, but apart from that it is
pretty much equivalent of unique not null. Obviously index is created, in
order to keep things unique.

the (col1, col2 DESC) type of index is useful, when you have query that uses
it that way. For example, if your query is to search index backwards, it
will be quite slow on some hardware - and adding DESC in index desc, will
make postgresql layout the bits on disc that way - which will obviously
speed things up.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message 纪晓曦 2009-10-14 13:22:26 Test for optimizer
Previous Message Albe Laurenz 2009-10-14 12:58:18 Re: different sort order for primary key index