Nonstop Database, HiRDB Version 9 Installation and Design Guide
An index should be created for the following columns:
An index should not be created for the following columns (if an index is created for such a column, retrieval performance will be degraded):
The CREATE INDEX definition SQL is used to create an index for a table.
Indexes cannot be specified for columns of the following types:
The length of an index key must satisfy the following condition; if this condition is not satisfied, the index cannot be defined:
|
If the page size of the index storage RDAREA is 4,096 bytes, the maximum key length that can be specified for an index is 806 bytes. For details about index key length, see Table 16-5 List of index key lengths.
For a multicolumn index, the total index key length is the total of the key lengths of the columns that make up the index.
The same index cannot be created more than once for the same table. The following examples show how indexes can be regarded as being the same index in spite of having different index names.
CREATE INDEX index-1 ON table-1 (column-1 ASC) CREATE INDEX index-2 ON table-1 (column-1 DESC) |
CREATE INDEX index-1 ON table-1 (column-1 ASC, column-2 ASC) CREATE INDEX index-2 ON table-1 (column-1 DESC, column-2 DESC) |
CREATE INDEX index-1 ON table-1 (column-1 ASC, column-2 DESC) CREATE INDEX index-2 ON table-1 (column-1 DESC, column-2 ASC) |
CREATE INDEX index-1 ON table-1 (column-1 DESC, column-2 DESC) CREATE INDEX index-2 ON table-1 (column-1 ASC, column-2 DESC) |
All Rights Reserved. Copyright (C) 2012, 2015, Hitachi, Ltd.