Re: Fwd: Index on table when using DESC clause

From: Andrew Lazarus <andrew(at)pillette(dot)com>
To: Yves Vindevogel <yves(dot)vindevogel(at)implements(dot)be>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Fwd: Index on table when using DESC clause
Date: 2005-05-23 20:27:15
Message-ID: 42923CA3.1040306@pillette.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

As far as I know, to use a straight index Postgres requires either

ORDER BY pages, description -- or --
ORDER BY pages DESC, description DESC.

If you want the results by pages DESC, description ASC, then you have to
make an index on an expression or define your own operator or something
esoteric like that. I would think the ability to have an index where the
columns don't all collate in the same direction would be an easy feature
to add.

Attachment Content-Type Size
andrew.vcf text/x-vcard 298 bytes

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Simon Riggs 2005-05-23 20:46:21 Re: Tuning planner cost estimates
Previous Message Oleg Bartunov 2005-05-23 19:46:38 Re: Fwd: Index on table when using DESC clause