Re: different sort order for primary key index - Mailing list pgsql-general

From Grzegorz Jaśkiewicz
Subject Re: different sort order for primary key index
Date
Msg-id 2f4958ff0910140616s68c5325cwe4e954cdee759b21@mail.gmail.com
Whole thread Raw
In response to different sort order for primary key index  (Paul Hartley <phartley@gmail.com>)
List 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.

pgsql-general by date:

Previous
From: "Albe Laurenz"
Date:
Subject: Re: different sort order for primary key index
Next
From: 纪晓曦
Date:
Subject: Test for optimizer