You can obtain query plans in two ways:
EXPLAINstatement outputs query plans in various text formats (see below).
- Management Console provides a graphical interface for viewing query plans. For detailed information, see Managing Queries in MC in Using Management Console.
EXPLAIN Output Options
EXPLAIN output represents the query plan as a hierarchy, where each level, or path, represents a single database operation that the optimizer uses to execute a query.
EXPLAIN output also appends DOT language source so you can display this output graphically with open source Graphviz tools.
EXPLAIN also supports an
EXPLAIN ANNOTATED returns a query with embedded optimizer hints, which encapsulate the query plan for this query. For an example of usage, see Using Optimizer-Generated and Custom Directed Queries Together.