on 2011 May 20 1:34 PM
Is it usefull to have an ascending and a descending index on the same column?
No, there is no need to define both an ascending column index and a descending index on the column. One or the other is sufficient and the SQL Anywhere server will perform a reverse index scan in cases that it makes sense to do so.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Just to add to Mark's sound answer (though Martin seems to refer to a single-column index):
The situation would be different if the index is a composite one (i.e. is built over 2 or more columns). Then not only the columns's order in the index (colA, colB vs. colB, colA), but also their according sort order will make a difference (colA ASC, colB ASC vs. colA ASC, colB DESC).
Cf. the docs.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
75 | |
10 | |
10 | |
10 | |
10 | |
9 | |
8 | |
7 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.