CREATE INDEX .. ON table1 (field1 asc, field2 desc) - Mailing list pgsql-general

From Timur
Subject CREATE INDEX .. ON table1 (field1 asc, field2 desc)
Date
Msg-id 18037029115.20020824201825@sdf.lonestar.org
Whole thread Raw
Responses Re: CREATE INDEX .. ON table1 (field1 asc, field2 desc)  (Bruno Wolff III <bruno@wolff.to>)
Re: CREATE INDEX .. ON table1 (field1 asc, field2 desc)  (Alvaro Herrera <alvherre@atentus.com>)
Re: CREATE INDEX .. ON table1 (field1 asc, field2 desc)  (Martijn van Oosterhout <kleptog@svana.org>)
List pgsql-general
Hello!

I am new to PostgreSQL and databases in general, and I have this
question: why it is not possible to specify ordering when creating an
index?

Let's say I have a query which looks like this:
SELECT * FROM table1
ORDER BY field1, field2 DESC
LIMIT 100;

Apparently, system won't use index ON (field1, field2) ..

I think it is pretty simple and hope there is a way to create index
with field2 indexed in descending order..

Thanks in advance.

Timur V. Irmatov.


pgsql-general by date:

Previous
From: Steve Lane
Date:
Subject: Why is pgbench suddenly slow?
Next
From: Bruno Wolff III
Date:
Subject: Re: CREATE INDEX .. ON table1 (field1 asc, field2 desc)