nerdexam
Oracle

1Z0-117 · Question #21

You executed the following statements: Which two statements are true about the query execution?

The correct answer is B. The query executes and displays the execution plan and statistics. E. The query will always use the plan displayed by the AUTOTRACE output. B: set autotrace traceonly: Displays the execution plan and the statistics (as set autotrace on does), but doesn't print a query's result. Autotrace can be configured to run the SQL & gives a plan and statistics afterwards or just give you an explain plan without executing the…

Monitoring and Analyzing SQL Performance

Question

You executed the following statements:

Which two statements are true about the query execution?

Exhibit

1Z0-117 question #21 exhibit

Options

  • AThe execution plan is generated and fetched from the library cache.
  • BThe query executes and displays the execution plan and statistics.
  • CThe query executes and inserts the execution plan in PLAN_TABLE.
  • DThe query executes and execution plan is stored in the library cache and can be viewed using v$SQL_PLAN.
  • EThe query will always use the plan displayed by the AUTOTRACE output.

How the community answered

(23 responses)
  • A
    4% (1)
  • B
    83% (19)
  • D
    13% (3)

Explanation

B: set autotrace traceonly: Displays the execution plan and the statistics (as set autotrace on does), but doesn't print a query's result. Autotrace can be configured to run the SQL & gives a plan and statistics afterwards or just give you an explain plan without executing the query. To achieve this use the following: * Explain only set autotrace traceonly explain * Execute with stats and explain plan set autotrace on explain stat (with data returned by query) or autotrace traceo expl stat (without data returned by query) * To make the output from an autotrace more readable col plan_plus_exp format a100 * Turn off autotrace set autotrace off / V$SQL_PLAN contains the execution plan information for each child cursor loaded in the library

Topics

#AUTOTRACE#execution plan#library cache#V$SQL_PLAN

Community Discussion

No community discussion yet for this question.

Full 1Z0-117 Practice