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 » Working with UltraLite Databases » Working with UltraLite indexes

Choosing an index type Next Page

Adding UltraLite indexes

You can use either Sybase Central or Interactive SQL to perform this task.


UltraLite does not detect duplicate or redundant indexes. As indexes must be maintained with the data in your database, add your indexes carefully.

Sybase Central

In Sybase Central, you can perform these tasks while working with a selected database.

To create a new index for a given UltraLite table (Sybase Central)
  1. Connect to the UltraLite database.

  2. Open the Indexes folder.

  3. From the File menu, choose New > Index.

    The Index Creation wizard appears.

  4. Name the index and select the table from the list. Click Next.

  5. Follow the instructions in the wizard.

    New indexes appear in the Indexes folder.

Interactive SQL

In Interactive SQL, you can perform these tasks with the CREATE INDEX statement.

To create a new index for a given UltraLite table (Interactive SQL)
  1. Connect to an UltraLite database.

  2. Execute a CREATE INDEX statement. See UltraLite CREATE INDEX statement.

    This creates an index with the default maximum hash size you have configured. To create an index that overrides the default, ensure you use the WITH MAX HASH SIZE value clause to set a new value for this index instance.

    Examples    To speed up a search on employee surnames in a database that tracks employee information, and tune the performance of queries against this index, you could create an index called EmployeeNames and increase the hash size to 20 bytes with the following statement:

    CREATE INDEX EmployeeNames
    ON Employees (Surname, GivenName)
  3. See also