Home » Oracle » 1z0-117 » Which two methods can you use to view the required execution plan?
An application user complains about statement execution taking longer than usual. You find that the query uses a bind variable in the WHERE clause as follows:
You want to view the execution plan of the query that takes into account the value in the bind variable PCAT.
Which two methods can you use to view the required execution plan?
A. Use the DBMS_XPLAN.DISPLAY function to view the execution plan.
B. Identify the SQL_ID for the statementsand use DBMS_XPLAN.DISPLAY_CURSOR for that SQL_ID to view the execution plan.
C. Identify the SQL_ID for the statement and fetch the execution plan PLAN_TABLE.
D. View the execution plan for the statement fromV$SQL_PLAN.
E. Execute the statement with different bind values and set AUTOTRACE enabled for session.
Correct Answer: BD
Explanation/Reference:
D:V$SQL_PLAN contains the execution plan information for each child cursor loaded in the library cache.
B:The DBMS_XPLAN package supplies five table functions:
DISPLAY_SQL_PLAN_BASELINE - to display one or more execution plans for the SQL statement identified by SQL handle
DISPLAY - to format and display the contents of a plan table.
DISPLAY_AWR - to format and display the contents of the execution plan of a stored SQL statement in the AWR.
DISPLAY_CURSOR - to format and display the contents of the execution plan of any loaded cursor.
DISPLAY_SQLSET - to format and display the contents of the execution plan of statements stored in a SQL tuning set.
Download Printable PDF. VALID exam to help you PASS.
|
|