Contents Index Dropping indexes Starting the Index Consultant

ASA SQL User's Guide
  Working with Database Objects
    Working with indexes

Index Consultant overview


The selection of a proper set of indexes can make a big difference to the performance of your database. To help you in the task of selecting such a set of indexes, Adaptive Server Anywhere includes an Index Consultant. The Index Consultant guides you through the process of selecting indexes for a single query or for a set of database requests (called a workload). It creates many different sets of virtual indexes. For each set, the Index Consultant optimizes queries and other requests as if those virtual indexes were present. The Index Consultant then gathers the results of these explorations into a set of recommendations.

There are several stages in the Index Consultant's work. Understanding these stages helps you make the most of the tool.

  1. Starting the Index Consultant.

    You can run the Index Consultant from either Interactive SQL or from Sybase Central. Access the Index Consultant from Interactive SQL to analyze indexes for a single query, and from Sybase Central to analyze indexes for a workload.

    For information on how to start the Index Consultant, see Starting the Index Consultant.

  2. Capturing a workload.

    A workload is a set of queries or other data manipulation statements over which the Index Consultant tries to optimize performance. Depending on your goals, you may wish to make your workload a representative set of operations, or you may wish to identify a set of key bottleneck operations. The Index Consultant can capture one or more workloads, and can store them for later analysis.

    For more information, see Understanding workloads.

  3. Analyzing the workload.

    The Index Consultant analyzes a workload or single query by generating candidate indexes and exploring their effect on performance. To explore the effect of different candidate indexes, the Index Consultant repeatedly re-optimizes the queries in the workload under different sets of indexes. It does not execute the queries.

    The Index Consultant can also store the results of multiple analyses on any workload, using different settings.

    When analyzing a workload, the Index Consultant presents you with a set of options:

    The analysis includes the following steps:

    For more information, see Understanding the analysis.

  4. Implementing the recommendations.

    The Index Consultant provides a SQL script that you can run to implement its recommendations. Before doing so, you may wish to assess the recommendations in the light of your own knowledge of your database.

    Using the Index Consultant with Interactive SQL 
    The Index Consultant can only analyze one statement at at time from ISQL.

    For more information, see Assessing the recommendations, and Implementing the recommendations.


Contents Index Dropping indexes Starting the Index Consultant