OCP-1Z0-052-V8.02-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  
答案解析:
A,正确,可以从统计信息的历史信息恢复统计信息。如下面这个储存过程。

RESTORE_TABLE_STATS Procedure

This procedure restores statistics of a table as of a specified timestamp (as_of_timestamp). The procedure will restore statistics of associated indexes and columns as well. If the table statistics were locked at the specified timestamp the procedure will lock the statistics. The procedure will not restore user defined statistics.

Syntax

DBMS_STATS.RESTORE_TABLE_STATS (
   ownname                   VARCHAR2,
   tabname                   VARCHAR2,
   as_of_timestamp           TIMESTAMP WITH TIME ZONE,
   restore_cluster_index     BOOLEAN DEFAULT FALSE,
   force                     BOOLEAN DEFAULT FALSE,
   no_invalidate             BOOLEAN DEFAULT to_no_invalidate_type
                                                    (GET_PARAM('NO_INVALIDATE')));


  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值