create index order by value question

UDA
Enthusiast

create index order by value question

I'm trying to determine which column an 'order by value' was based on after an index has been created.

ie. create index on db.table INDEX (a, b) ORDER BY VALUE (b)

How would I determine that 'b' was the basis for the ordering (currently both a and b get assigned as V when I check the indextype)?

Thanks

1 REPLY
Junior Contributor

Re: create index order by value question

From the Data Dictionary manual
IndexType I (ordering column of a composite secondary index)

A value ordered composite secondary index uses *two* consecutive index numbers, e.g. if the NUSI is #x then there's a #x+4 with Index type I:

IndexNumber IndexType UniqueFlag ColumnName
4 V N a
4 V N b
8 I N b

Dieter