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

SQL Anywhere 10.0.1 » SQL Anywhere Server - SQL Usage » Query Optimization and Execution » How the optimizer works » Underlying assumptions

Statistics are present and correct Next Page

Indexes can be used to satisfy a predicate

Often, SQL Anywhere can evaluate sargable predicates with the aid of an index. Using an index, the optimizer speeds access to data and reduces the amount of information read and processed from base tables. For example, when optimization_goal is set to first-row, the optimizer tries to use indexes to satisfy ORDER BY and GROUP BY clauses. See optimization_goal option [database].

When the optimizer cannot find a suitable index, it resorts to a sequential table scan, which can be expensive. An index can improve performance dramatically when joining tables. Add indexes to tables or rewrite queries wherever doing so facilitates the efficient processing of common requests.

To find out if your query performance can be improved by creating new indexes, use the Application Profiling wizard found in Application Profiling mode in Sybase Central.

For more information on profiling and predicate analysis, see Application profiling, and Predicate analysis.