Dbms_stats. Gather_table_stats (
Ownname VARCHAR2,
TabName VARCHAR2,
PartName VARCHAR2 DEFAULT NULL,
Estimate_percent number
Block_sample BOOLEAN DEFAULT FALSE,
Method_opt VARCHAR2
Degree number
Granularity VARCHAR2
Cascade BOOLEAN
Stattab VARCHAR2 DEFAULT NULL,
Statid VARCHAR2 DEFAULT NULL,
Statown VARCHAR2 DEFAULT NULL,
No_invalidate BOOLEAN DEFAULT,
StatType VARCHAR2 DEFAULT ' DATA ',
Force BOOLEAN DEFAULT FALSE);
1.estimate_percent: Sampling percent, valid range is [0.000001,100]
2.block_sample: Using random block sampling instead of random row sampling
3.cascade: Whether to collect statistics for this table index
4.degree: Number of CPUs processed in parallel
5.granularity: Statistical data collection, ' All '-collects all (sub-partitions, partitions and global) statistics
Ownname VARCHAR2
Estimate_percent number
Block_sample BOOLEAN DEFAULT FALSE,
Method_opt VARCHAR2
Degree number
Granularity VARCHAR2
Cascade BOOLEAN
Stattab VARCHAR2 DEFAULT NULL,
Statid VARCHAR2 DEFAULT NULL,
Options VARCHAR2 DEFAULT ' GATHER ',
Objlist out Objecttab,
Statown VARCHAR2 DEFAULT NULL,
No_invalidate BOOLEAN
Force BOOLEAN DEFAULT FALSE,
Obj_filter_list objecttab DEFAULT NULL);
待续:后续会做对应参数的解释,以及使用场景http://docs.oracle.com/cd/E11882_01/appdev.112/e40758/d_stats.htm#ARPLS68582
Oracle Statistical information Collection