The Workload Query Advisor uses a set of rules and best-practices
to find structures in SQL statements that are likely cause the optimizer
to choose suboptimal access paths. You can rewrite the statements
to resolve the problems that are identified in the recommendations.
About this task
The Workload Query Advisor looks for opportunities in
a query to do the following:
- Minimize the number of index pages and data rows that have to
be read. For example, you can minimize the number of rows read by
having predicates in the query that can determine the needed rows
from just the index alone.
- Minimize sort operations. For example, the advisor determines
whether ORDER BY or GROUP BY clauses are needed in the query, or if
sort operations can be resolved via index access.