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.
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.