Oracle Database 12c: Installation and Administration — Question 174
Examine the following command:
SQL> DBMS_STATS. SET_TABLE_PREFS ('SH', 'CUSTOMERS', 'PUBLISH', 'false');
What is the effect of executing this command?
Answer options
- A. Existing statistics for the CUSTOMERS table become unusable for the query optimizer.
- B. Automatic statistics collection is stopped for the CUSTOMERS table.
- C. Statistics for the CUSTOMERS table are locked and cannot be overwritten.
- D. Statistics subsequently gathered on the CUSTOMERS table are stored as pending statistics.
Correct answer: D
Explanation
The command sets the 'PUBLISH' preference to 'false', which means that any statistics collected afterward will not be immediately published, making them pending. The other options do not accurately reflect the effect of this command; it does not stop automatic collection, lock existing statistics, or render existing statistics unusable.