CREATE INDEX .. ON table1 (field1 asc, field2 desc)

From: Timur <itvthor(at)sdf(dot)lonestar(dot)org>
To: pgsql-general(at)postgresql(dot)org
Subject: CREATE INDEX .. ON table1 (field1 asc, field2 desc)
Date: 2002-08-24 15:18:25
Message-ID: 18037029115.20020824201825@sdf.lonestar.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bruno Wolff III 2002-08-24 15:42:46 Re: CREATE INDEX .. ON table1 (field1 asc, field2 desc)
Previous Message Vince Vielhaber 2002-08-24 14:51:30 Re: [GENERAL] PostgreSQL 7.2.2: Security Release