CREATE INDEX statement
450
The MAX_HASH_SIZE database option changes the default hash size for
indexes.
Using WITH HASH on old databases
If you use the WITH HASH clause on databases created before the Aspen
release, no error is raised. However, all index entries will use a ten byte
limit on the database. The database must be created with Aspen or later
software.
$ For more information, see "How indexes work" on page 817 of the
book ASA User’s Guide.
♦
SQL/92 Vendor extension.
♦
Sybase Adaptive Server Enterprise has a more complex CREATE
INDEX statement than Adaptive Server Anywhere. While the Adaptive
Server Enterprise syntax is permitted in Adaptive Server Anywhere,
some clauses and keywords are ignored.
The full syntax for Adaptive Server Enterprise 11.5 is as follows:
CREATE [ UNIQUE ] [ CLUSTERED | NONCLUSTERED ]
… INDEX
index-name
… ON [ [
database
.]
owner
.]
table_name
(
column_name
[,
column_name
], …)
… [ WITH {
… { FILLFACTOR | MAX_ROWS_PER_PAGE } =
x
,
CONSUMERS =
x
,
… IGNORE_DUP_KEY,
… SORTED_DATA,
[ IGNORE_DUP_ROW | ALLOW_DUP_ROW ]
} ]
… [ ON
segment_name
]
Adaptive Server Enterprise indexes can be either clustered or
nonclustered. A clustered index almost always retrieves data faster than
a nonclustered index. Only one clustered index is permitted per table.
Adaptive Server Anywhere does not support clustered indexes. The
CLUSTERED and NONCLUSTERED keywords are allowed by
Adaptive Server Anywhere, but no action is taken.
Adaptive Server Anywhere also allows, by ignoring, the following
keywords:
♦ FILLFACTOR
♦ IGNORE_DUP_KEY
♦ SORTED_DATA
♦ IGNORE_DUP_ROW
Standards and
compatibility