Value-ordered multicolumn NUSIs created with an ORDER BY clause consume two consecutive index numbers of the allotted 32 index numbers. One index of the consecutively numbered pair represents the column list, while the other index in the pair represents the ordering column.
Consider the following scenario:
- You create 32 indexes on a table, none of which is value-ordered.
- You drop every other index on the table, meaning that you drop either all the odd-numbered indexes or all the even-numbered indexes.
For example, if you had dropped all the even-numbered indexes, there would now be 16 odd-numbered index numbers available to be assigned to indexes created in the future.
- You attempt to create a multicolumn NUSI with an ORDER BY clause.
The system returns an error message because two consecutive index numbers were not available for assignment to the ordered multicolumn NUSI.
You are still able to create 16 additional value-ordered single column NUSIs, non-value-ordered NUSIs, USIs, hash indexes, or join indexes, but you cannot create any ordered multicolumn NUSIs.
To work around this problem, perform the following procedure:
- Drop any index on the table.
This action frees 2 consecutive index numbers.
- Create the ordered multicolumn NUSI that failed previously.
- Recreate the index you dropped to free the consecutive index numbers.