granularity Granularity of statistics to collect (only pertinent if the table is partitioned).'ALL' - gathers all (subpartition, partition, and global) statistics'AUTO'- determines the granularity based on the partitioning type. This is the default value.'DEFAULT' - gathers global and partition-level statistics. This option is obsolete, and while currently supported, it is included in the documentation for legacy reasons only. You should use the 'GLOBAL AND PARTITION' for this functionality. Note that the default value is now 'AUTO'.'GLOBAL' - gathers global statistics'GLOBAL AND PARTITION' - gathers the global and partition level statistics. No subpartition level statistics are gathered even if it is a composite partitioned object.'PARTITION '- gathers partition-level statistics'SUBPARTITION' - gathers subpartition-level statistics.
Vldb Statistics Gathering Strategy
VLDB Statistics Gathering StrategySomething You Need to Know But Maybe You Don’t
About Me • Technical Director @ Enmo Tech • ACOUG Co-founder, President • Interests: – My wife and my son – Database technology (all related) – World of Warcraft (online game) • http://www.enmotech.com • http://www.acoug.org • http://www.dbform.com云和恩墨 成就所托
How Many Choices dba_tab_modific• method_opt=> ations – for columns size skewonly [column_name] – for columns size auto [column_name] COL_USAGE$ – for columns size repeat [column_name] – for columns size 1 [column_name] – for all columns – for all indexed columns云和恩墨 成就所托
How Should We Do?• Step 1 – method_opt=>FOR ALL COLUMNS SIZE 1• Step 2 (repeat) – method_opt=>FOR COLUMNS SIZE AUTO [COLUMN_NAME]• Step 3 – Using atomatic statistics gathering job – (10g) exec DBMS_STATS.SET_PARAM (METHOD_OPT, FOR ALL COLUMNS SIZE REPEAT); – (11g) exec DBMS_STATS.SET_GLOBAL_PREFS(METHOD_OPT,FOR ALL COLUMNS SIZE REPEAT);云和恩墨 成就所托
What is Granularity• 只针对分区表• ALL• AUTO (默认值)• DEFAULT = GLOBAL AND PARTITION• GLOBAL• GLOBAL AND PARTITION• PARTITION• SUBPARTITION云和恩墨 成就所托