Creating an Index on an IQ Store Table

Create an index on an IQ store (main store) table.

Prerequisites
Database Version Table Index Privileges
SAP Sybase IQ 15.3 and 15.4 You must have CREATE permission on the specified dbspace.
You must also have one of:
  • DBA authority
  • REFERENCE permission on the underlying table of the index
  • You own the underlying table of the index
SAP Sybase IQ 16.0 You must have CREATE permission on the specified dbspace.
You must also have one of:
  • CREATE ANY INDEX system privilege
  • CREATE ANY OBJECT system privilege
  • REFERENCE permission on the underlying table of the index
  • You own the underlying table of the index
Task

Indexes improve search performance on the indexed column or columns. Indexes take up space in the database, however, and slow down the performance of insert, delete, and update operations.

When creating indexes, the order in which you specify the columns becomes the order in which the columns appear in the index. Duplicate references to column names in the index definition are not allowed.

  1. In the Perspective Resources view, select the resource, and select Resource > Administration Console.
  2. In the left pane, expand IQ Servers > Schema Objects > Tables, and then select Tables or Global Temporary Tables.
  3. Select an IQ main store table from the right pane and either:
    • Click the arrow to the right of the name and select Properties, or
    • From the Administration Console menu bar, select Resource > Properties.
    The Table Properties view appears.
  4. In the left pane, select Indexes.
    Note: Indexes does not appear for Proxy tables as they are not supported.
  5. Click New.
  6. On the Index Name page, specify a name for the index. Click Next.
  7. On the Index Type page, select the type of index. Enter a value in the notify count field if you want to be notified after a specified number of inserts to the index. Default value is 100000. To disable notification, enter zero (0) in the field. Click Next.
  8. (For index type Word only) (Optional) Enter a word separator character and a maximum word length permitted in the index. Default value is 255 characters. Click Next.
  9. On the Dbspace page, indicate if the index is to be unique and the dbspace in which to store the index. Click Next.
  10. On the Columns page, highlight one or more columns and click Add Asc or Add Desc
    Note: Use Shift-click or Control-click to select multiple columns.
    1. In the Columns in index list, highlight a single column and click the up and down buttons to reposition the column.
    2. Highlight one or more columns and click Remove to remove columns from the index.
  11. Click Next.
  12. (Optional) On the Comment page, enter a text comment for the index.
  13. Click Finish.
    The index appears in the properties view, but is not saved to the database.
  14. Do one of:
    • Click OK to update any changes to the database and exit the properties view.
    • Click Apply to update any changes to the database, but remain in the properties view.
    • Click Cancel to cancel any changes not updated to the database and exit the properties view.
Related tasks
Creating an Index on an IQ System Store Table
Deleting a Table Index
Rebuilding a Table Index
Validating a Table Index
Moving a Table Index
Generating Table Index DDL Commands
Viewing or Modifying Table Index Properties
Authenticating a Login Account for a Managed Resource
Related reference
Column Index Types
Table Index Privilege Summary