Multicolumn indexes and ORDER BY - Mailing list pgsql-general

From Jernej Kos
Subject Multicolumn indexes and ORDER BY
Date
Msg-id 200406160712.26939.kostko@jweb-network.net
Whole thread Raw
Responses Re: Multicolumn indexes and ORDER BY  (Martijn van Oosterhout <kleptog@svana.org>)
List pgsql-general
I have a multicolumn index on two columns. If i use the columns in ORDER BY
like this:
  ORDER BY col1, col2;

The index is used. But, if one column is sorted DESC it is not used:
  ORDER BY col1 DESC, col2;

How can i make this work ?

Regards,
Jernej Kos.
--
Kostko <kostko@jweb-network.net>
JWeb-Network

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: "Interesting" query planning for timestamp ranges in where clause?
Next
From: Martijn van Oosterhout
Date:
Subject: Re: Multicolumn indexes and ORDER BY