Oracle Database 12c: Performance Management and Tuning — Question 4
You want to generate statistics for new objects added to an OLTP application without affecting old statistics and the sessions that currently use them.
Which two tasks would you perform to test the new statistics? (Choose two.)
Answer options
- A. Set the OPTIMIZER_USE_PENDING_STATISTICS initialization parameter to TRUE for the session.
- B. Set the STALE_PERCENT statistics preference to zero and then gather statistics.
- C. Set the PUBLISH statistics preference to FALSE and then gather statistics.
- D. Use the DBMS_STATS.PUBLISH_PENDING_STATS procedure to make pending statistics the current statistics.
- E. Set the NO_INVALIDATE statistics preference to FALSE and gather statistics without affecting old statistics.
Correct answer: A, B
Explanation
The correct answer includes option A, which allows the session to use pending statistics without impacting the current statistics, and option B, which ensures that no stale statistics are considered by setting STALE_PERCENT to zero. Options C and D do not address testing new statistics without affecting old ones, while option E incorrectly suggests invalidating statistics, which contradicts the requirement.