OCP 1Z0 052 41

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


你可能感兴趣的:(OCP 1Z0 052 41)