Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 11.0.1 (Français) » UltraLite - Database Management and Reference » UltraLite Database Reference » UltraLite creation parameters


UltraLite max_hash_size creation parameter

Sets the maximum default index hash size in bytes.

{ ulcreate | ulinit | ulload } -o max_hash_size=value;...
Allowed values

0 to 32 bytes


4 bytes


A hash is an optional part of an index entry that is stored in the index page. The hash transforms the actual row values for the indexed columns into a numerical equivalent (a key), while still preserving ordering for that index. The size of the key, and how much of the actual value UltraLite hashes, is determined by the hash size you set.

A row ID allows UltraLite to locate the row for the actual data in the table. A row ID is always part of an index entry. If you set the hash size to 0 (disable index hashing), then the index entry only contains this row ID. For all other hash sizes, the hash key, which can contain all or part of the transformed data in that row, is stored along with the row ID in the index page. You can improve query performance on these indexed columns because UltraLite may not always need to find, load, and unpack data before it can compare actual row values.

Determining an appropriate default database hash size requires that you evaluate the tradeoff between query efficiency and database size: the higher the maximum hash value, the larger the database size grows.

UltraLite only uses as many bytes as required for the data type(s) of the column(s), up to the maximum value specified by this parameter. The default hash size is only used if you do not set a size when you create the index. If you set the default hash size to 0, UltraLite does not hash row values.

You cannot change the hash size for an existing index. When creating a new index, you can override the default value with the UltraLite Create Index Wizard in Sybase Central, or with the WITH MAX SIZE clause of a CREATE INDEX or a CREATE TABLE statement.

If you declare your columns as DOUBLE, FLOAT, or REAL, no hashing is used. The hash size is always ignored.

From Sybase Central, you can set the maximum hash size in any wizard that creates a database. On the New Database Storage Settings page, select the Maximum Hash Size For Indexes option.

From a client application, set this parameter as one of the creation parameters for the create database method on the database manager class.

See also