Running the Index Advisor

If you set the INDEX_ADVISOR option on your database, SAP Sybase IQ issues messages in the message log or query plan to suggest additional indexes that might improve performance.

  1. In Interactive SQL, set the INDEX_ADVISOR option:
    SET OPTION index_advisor = 'ON'
  2. Examine the message log file. By default, the message log is named dbname.iqmsg, and the file is created in the same directory as the catalog store.
    Look for messages that focus on the following areas:
    • Local predicate columns

    • Single-column join key columns

    • Correlated subquery columns

    • Grouping columns

  3. If you decide to follow the recommendations of the index advisor messages, create the suggested indexes:
    CREATE HG INDEX id_hg
    ON SalesOrderItems
    ( ID ) IN Dsp5