In many cases, when you capture a query for tuning, the text of the query is not well formatted. The workflow assistant for query tuning can format the query so that each table reference, each column reference under in the SELECT clause, and each predicate, is shown on its own line.
You can expand and collapse sections of complex queries, such as query blocks and subqueries, to see an overview of the query and drill into parts of the query in more detail. When you click any line in the formatted query, other lines of the query that contain column or table references from the same table are also highlighted. You can also customize the formatting by ordering the predicates according to various criteria such as local predicates or join predicates, table references, and highest filter factor.
If you are using InfoSphere® Optim™ Query Tuner or InfoSphere Optim Query Workload Tuner: The workflow assistant annotates a formatted query with various statistics. For a full list of these annotations, refer to the help for the Review Formatted Query page. Open this help by clicking the Help button in the top-right corner of the page. You can also press F1.
To format an SQL statement:
The Query Tuner Workflow Assistant opens to the Review section. If the Review Formatted Query page is not opened because you selected additional options in the Select Activities window, click Open Formatted Query on the left side of this section.
In the formatted query, each table reference, each column reference under the SELECT clause, and each predicate, is shown on its own line. You can expand and collapse sections of complex queries, such as query blocks and subqueries, to see an overview of the query and drill into parts of the query in more detail. When you click any line in the formatted query, other lines of the query that contain column or table references from the same table are also highlighted. You can also customize the formatting by ordering the predicates according to various criteria such as local predicates or join predicates, table references, and highest filter factor.