SQL Tuning Tools   «Prev  Next»

SQL Management - Quiz

Select the best answer or answers for each question.
1. Which are potential benefits of a well-designed stored procedure API? (Choose all that apply)
Please select all the correct answers.
  A. A definer-rights API can expose approved operations without granting callers direct access to its underlying tables.
  B. Every SQL statement runs faster when placed inside a stored procedure.
  C. Shared business operations can be centralized behind a reusable interface.
  D. Stored procedures automatically prevent injection, including in concatenated dynamic SQL.

2. Which practices support effective Oracle 26ai SQL tuning? (Choose all that apply)
Please select all the correct answers.
  A. Use appropriately typed bind variables for changing input data values.
  B. Keep every frequently executed SQL statement in the shared pool as a routine first step.
  C. Reject every execution plan containing a full table scan.
  D. Establish a baseline and test changes with representative inputs and workload conditions.

3. Which statement best describes the SQL developer's role in a tuning investigation?
Please select the best answer.
  A. Finish the SQL quickly and leave correctness and performance to the DBA.
  B. Collaborate with the DBA to preserve correct results and meet agreed performance and transaction requirements.
  C. Move every query into a stored procedure before investigating its behavior.
  D. Choose the query with the lowest optimizer cost without testing application behavior.

4. When examining an observed SQL execution, which statements are correct? (Choose all that apply)
Please select all the correct answers.
  A. EXPLAIN PLAN executes the target query and records its actual elapsed time.
  B. ALLSTATS LAST reconstructs runtime measurements that were never collected.
  C. DBMS_XPLAN.DISPLAY_CURSOR can display the plan of the relevant loaded cursor when the required access is available.
  D. Runtime row-source statistics must have been collected for the execution being investigated.

5. A reusable, non-autonomous procedure participates in a larger caller-controlled transaction. Which design best preserves the caller's ability to commit or roll back the complete operation?
Please select the best answer.
  A. Commit inside the procedure immediately after each successful update.
  B. Roll back the entire session transaction whenever the procedure rejects an input.
  C. Convert the procedure to an autonomous transaction so its changes are independent.
  D. Leave commit and rollback decisions to the caller and document the procedure's error behavior.