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

SQL Anywhere 10.0.1 » UltraLite - Database Management and Reference » Creating and Configuring UltraLite Databases » Choosing creation-time database properties for UltraLite

UltraLite platform requirements for character set encoding Next Page

UltraLite index performance considerations

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 consequently how much of the actual value UltraLite hashes, is determined by the hash size you set.

UltraLite databases automatically use a default maximum hash size of 4 bytes. You can change this default to another size, or change it to 0 to disable index hashing. You can override this database default hash size when you create a new index.

How a hash improves performance

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 (that is, 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. Consequently 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.

How you determine this database default 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.

See also