Search notes:

Oracle: DBMS_XPLAN

dbms_xplan provides «table» functions to format SQL execution plans:
display Display a plan that is generated by explain plan
display_cursor Displays the plan of a cursor in the shared SQL area.
display_sqlset Execution plans in an SQL tuning set.
display_sql_plan_baseline Displays plans stored in the SQL plan baseline history.
display_workload_repository Displays plans for SQL statements found in the Automatic Workload Repository (Views selected from seem to include DBA_HIST_SQL_PLAN, AWR_ROOT_SQL_PLAN, AWR_PDB_SQL_PLAN, DBA_HIST_SQLTEXT, AWR_ROOT_SQLTEXT and AWR_PDB_SQLTEXT)
display_awr Deprecated. Displays plans that are found in the Automatic Workload Repository.
Other functions are
build_plan_xml
compare_plans
diff_plan
diff_plan_awr
diff_plan_cursor
diff_plan_outline
diff_plan_sql_baseline
display
display_awr
display_plan
display_shard_plans
display_sql_patch_plan
display_sql_profile_plan
format_number
format_number2
format_size
format_size2
format_time_s
get_cursor_rows
get_final_plan
get_plandiff_report_xml
get_plan_rows
i_display_cursor
i_display_smb_plan
prepare_plan_xml_query
prepare_records
validate_format

display

The format parameter allows to specify some additional data that is returned by dbms_xplan, for example:
select * from table(dbms_xplan.display(format => 'basic +hint_report'));
select * from table(dbms_xplan.display(format => 'typical'           ));
select * from table(dbms_xplan.display(format => '+alias'            ));
select * from table(dbms_xplan.display(format => 'advanced'          ));

See also

The error message cannot fetch plan for …
The SQL scripts exps.sql and expe.sql.
SQL execution plan
Oracle DBMS PL/SQL packages
Oracle introduced two new (but undocumented) functions to dbms_xplan in 21c: DBMS_XPLAN[compare_cursor and compare_xplan.

Index