Subject | RE: [firebird-support] have one primary key only => better to have index or not? |
---|---|
Author | Helen Borrie |
Post date | 2011-12-23T08:06:35Z |
At 08:47 PM 23/12/2011, Svein Erling Tysvær wrote:
alter table...
add
[CONSTRAINT constraint-name]
<constraint-type> <constraint-definition>
[USING [ASC[ENDING] | DESC[ENDING]] INDEX index_name]
./hb
>3) Maybe (I haven't checked) the STARTING query above could benefit from an additional DESCending index on ITEM (Firebird indexes are unidirectional and the unique constraint will automatically generate an ASCending index, I don't think descending indexes are ever created automatically).By default, the automatic indexes for constraints are created as ascending. However, you can use the optional USING clause to have the constraint index created as descending:
alter table...
add
[CONSTRAINT constraint-name]
<constraint-type> <constraint-definition>
[USING [ASC[ENDING] | DESC[ENDING]] INDEX index_name]
./hb