nerdexam
Oracle

1Z0-117 · Question #11

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 correct answer is B. Identify the SQL_ID for the statementsand use DBMS_XPLAN.DISPLAY_CURSOR for that SQL_ID to D. View the execution plan for the statement from V$SQL_PLAN. D: V$SQL_PLAN contains the execution plan information for each child cursor loaded in the 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…

Using SQL Tuning Tools

Question

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?

Options

  • AUse the DBMS_XPLAN.DISPLAY function to view the execution plan.
  • BIdentify the SQL_ID for the statementsand use DBMS_XPLAN.DISPLAY_CURSOR for that SQL_ID to
  • CIdentify the SQL_ID for the statement and fetch the execution plan PLAN_TABLE.
  • DView the execution plan for the statement from V$SQL_PLAN.
  • EExecute the statement with different bind values and set AUTOTRACE enabled for session.

How the community answered

(34 responses)
  • A
    9% (3)
  • B
    71% (24)
  • C
    18% (6)
  • E
    3% (1)

Explanation

D: V$SQL_PLAN contains the execution plan information for each child cursor loaded in the 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.

Topics

#DBMS_XPLAN#bind variable#V$SQL_PLAN#execution plan retrieval

Community Discussion

No community discussion yet for this question.

Full 1Z0-117 Practice