052-42

Examine the command:
SQL> DBMS_STATS.SET_TABLE_PREFS('SH', 'CUSTOMERS', 'PUBLISH', 'false');
Which statement describes the effect of the above command?
A.Automatic statistics collection is stopped for the CUSTOMERS table.
B.Statistics for the CUSTOMERS table are locked and cannot be overwritten.
C.Existing statistics for the CUSTOMERS table become unusable for the query optimizer.
D.Subsequently, statistics gathered on the CUSTOMERS table are stored as pending statistics.

  这里设置 PUBLISH,意思是决定是否 job 收集完统计信息就马上发布,11.1 以前是马上发布到字典表,现在用户可以收集后不立即发布,它容许 dba 在发布前进行测试。
  这个题目是关于统计挂起的,在11g里面强化了统计数据自动发布的控制,可以通过配置OPTIMIZER_PENDING_STATISTICS为true来使用统计数据挂起,使用DBMS_STATS.GET_PREFS来检查是否挂起,使用[DBA|ALL|USER]_TAB_PENDING_STATS和[DBA|ALL|USER]_IND_PENDING_STATS来查看未发布的统计。这道题目设置关于customers表的统计自动发布挂起,所以收集统计数据后会保留数据不自动发布

原文地址:https://www.cnblogs.com/Babylon/p/7997943.html