Oracle OCP 1Z0 053 Q28(INCREMENTAL)

abstractcyj發表於2016-04-01
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部落格 ” ,連結:http://blog.itpub.net/8520577/viewspace-2073826/,如需轉載,請註明出處,否則將追究法律責任。

相關文章