ITPub博客

首页 > 数据库 > Oracle > Oracle OCP 1Z0 053 Q28(INCREMENTAL)

Oracle OCP 1Z0 053 Q28(INCREMENTAL)

原创 Oracle 作者:abstractcyj 时间:2016-04-01 16:56:49 0 删除 编辑
28.You have a range-partitioned table in your database. Each partition in the table contains the sales data
for a quarter.
The partition related to the current quarter is modified frequently and other partitions undergo fewer data
manipulations. The preferences for the table are set to their default values. You collect statistics for the
table using the following command in regular intervals:
SQL> EXECUTE
DBMS_STATS.GATHER_TABLE_STATS('SH','SALES',GRANULARITY=>'GLOBAL');
You need statistics to be collected more quickly. What can you do to achieve this?
A. Set DYNAMIC_SAMPLING to level 4.
B. Set the STATISTICS_LEVEL parameter to BASIC.
C. Set the INCREMENTAL value to TRUE for the partition table.
D. Increase the value of STALE_PERCENT for the partition table.
Answer: C

收集统计信息时,设置分区表的INCREMENTAL, 可以减少统计信息收集时所需要扫描的分区。

参考:https://docs.oracle.com/cd/B28359_01/appdev.111/b28419/d_stats.htm#BEIBJJHC


DBMS_STATS.SET_*_PREFS

AUTOSTATS_TARGET (SET_GLOBAL_PREFS only)
CASCADE
DEGREE
ESTIMATE_PERCENT
METHOD_OPT
NO_INVALIDATE
GRANULARITY
PUBLISH
INCREMENTAL
STALE_PERCENT


INCREMENTAL - This value determines whether or not the global statistics of a partitioned table will be maintained without doing a full table scan. With partitioned tables it is very common to load new data into a new partition. As new partitions are added and data loaded, the global table statistics need to be kept up to date. Oracle will update the global table statistics by scanning only the partitions that have been changed instead of the entire table if the following conditions hold:


来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/8520577/viewspace-2073826/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
曾从事java方向开发多年。近年已经转入数据库方向。主要擅长SQL优化,Oracle数据库问题诊断,Oracle备份与恢复等。服务于医药物流,医院等行业

注册时间:2010-01-26

  • 博文量
    602
  • 访问量
    1091647