From: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
---|---|
To: | Emil Rachovsky <zsevgymko(at)yahoo(dot)com> |
Cc: | pgsql-sql(at)postgresql(dot)org, pgsql-general(at)postgresql(dot)org |
Subject: | Re: [SQL] Question on indexes |
Date: | 2005-12-19 16:31:33 |
Message-ID: | 20051219163133.GC9980@surnet.cl |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-sql |
Emil Rachovsky wrote:
>
> Hi,
> Can anyone show me a simple way of creating an index
> in PostGre like that:
> create index indName on someTable(someIntColumn DESC)
> ?
Not using that particular syntax, but you can do that if you create the
appropiate operator classes. Note that if you want to use btree index
on a single column, you don't need to have a descending index, because
btree indexes can be scanned in either direction. The opclass trick is
only needed if you want to have a multicolumn index. (I guess in the
other access methods it doesn't make much sense to think of descending
indexes.)
--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.
From | Date | Subject | |
---|---|---|---|
Next Message | vishal saberwal | 2005-12-19 16:35:14 | Re: Versioning Schema/Stored Procedures |
Previous Message | vishal saberwal | 2005-12-19 16:29:09 | Re: Question on indexes |
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Fuhr | 2005-12-19 16:54:49 | Re: how to convert relational column to array? |
Previous Message | vishal saberwal | 2005-12-19 16:29:09 | Re: Question on indexes |