SQL Tuning   «Prev  Next»

SQL Tuning Concepts - Quiz

Each question is worth one point. Select the best answer or answers for each question.
1. Which practices can support SQL cursor reuse and reduce unnecessary parsing? (Choose all that apply)
Please select all the correct answers.
  A. Use consistent SQL text with appropriately typed bind variables for changing data values.
  B. Reuse valid prepared statements when the application interface supports it.
  C. Assume that placing SQL in a stored procedure guarantees one execution plan.
  D. Remove every built-in function so that Oracle can share the SQL.

2. Which statements correctly describe Oracle SQL tuning tools? (Choose all that apply)
Please select all the correct answers.
  A. TKPROF formats SQL trace files for analysis.
  B. SQL*Loader displays the executed cursor plan for an application query.
  C. DBMS_XPLAN.DISPLAY_CURSOR displays a cached cursor plan and available collected execution statistics.
  D. EXPLAIN PLAN records a proposed execution plan without executing the target statement.

3. Which statements describe cost-based optimization in Oracle AI Database 26ai? (Choose all that apply)
Please select all the correct answers.
  A. The optimizer uses available statistics and other information to estimate the work of candidate plans.
  B. Missing table statistics automatically switch Oracle to the rule-based optimizer.
  C. Automatic statistics collection and DBMS_STATS support optimizer statistics management.
  D. The lowest displayed optimizer cost guarantees the shortest measured execution time.

4. Which statements correctly describe EXPLAIN PLAN? (Choose all that apply)
Please select all the correct answers.
  A. It records proposed plan operations in a plan table.
  B. DBMS_XPLAN.DISPLAY can format the recorded plan information.
  C. It executes the target query and measures its actual elapsed time.
  D. Its output is guaranteed to match the plan used by every application execution.

5. Which statements about optimizer hints are correct? (Choose all that apply)
Please select all the correct answers.
  A. FULL and INDEX hints can influence the access path for a table reference.
  B. Every syntactically valid hint guarantees faster execution.
  C. A hint usage report can help identify hints that were used or ignored during plan generation.
  D. Successful SQL execution proves that every hint in the statement was honored.