您的位置:首页 > 其它

OCP 1Z0 052 41

2014-06-11 17:52 197 查看
41. You have recently collected statistics on certain objects of a schema in your database. But you

observe suboptimal execution plans for the queries on these objects after two days of statistics collection.

The optimizer statistics retention period is set to its default value.

Which action would help to use the previous set of statistics on the objects?

A.Restore statistics from statistics history.

B.Reduce the optimizer statistics retention period by 2 days.

C.Set the OPTIMIZER_PENDING_STATISTICS parameter to TRUE.

D.Reduce the Automatic Workload Repository (AWR) retention period by 2 days.

Answer: A

SQL>
SQL> BEGIN
2    dbms_stats.gather_table_stats(ownname => USER, tabname => 'EMP');
3  END;
4  /
PL/SQL procedure successfully completed

SQL> /
PL/SQL procedure successfully completed

SQL> col table_name a10
SQL> SELECT OWNER,TABLE_NAME,STATS_UPDATE_TIME FROM Dba_Tab_Stats_History WHERE owner = 'TEST';
OWNER  TABLE_NAME                     STATS_UPDATE_TIME
------ ------------------------------ --------------------------------------------------------------------------------
TEST   EMP                            11-JUN-14 05.54.56.234000 PM +08:00
TEST   EMP                            11-JUN-14 05.54.56.781000 PM +08:00
2 rows selected
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: