ASA SQL User's Guide
Query Optimization and Execution
How the optimizer works
Underlying assumptions
Often, Adaptive Server Anywhere can evaluate predicates with the aid of an index. Using an index, the optimizer speeds access to data and reduces the amount of information read. For example, when OPTIMIZATION_GOAL is set to first-row, the Adaptive Server Anywhere optimizer will try to use indexes to satisfy ORDER BY and GROUP BY clauses.
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.