这次讲解一下收集统计信息常用的存储过程
收集统计信息类:
一、dbms_stats.gather_table_stats存储过程
This procedure gathers table and column (and index) statistics. It attempts to parallelize as much of the work as possible, but there are some restrictions as described in the individual parameters.
SQL> desc dbms_stats.gather_table_stats;
Parameter Type Mode Default?
---------------- -------- ---- --------
OWNNAME VARCHAR2 IN --所有者的姓名
TABNAME VARCHAR2 IN --要分析的表名
PARTNAME VARCHAR2 IN Y --要分析的分区名称
ESTIMATE_PERCENT NUMBER IN Y --采样的比例
BLOCK_SAMPLE BOOLEAN IN Y --是否块分析
METHOD_OPT VARCHAR2 IN Y --分析的方式
DEGREE NUMBER IN Y --分析的并行度
GRANULARITY VARCHAR2 IN Y --分析的粒度
CASCADE BOOLEAN IN Y --是否分析索引
STATTAB VARCHAR2 IN Y --使用的性能表名
STATID VARCHAR2 IN Y --性能表的标识
STATOWN VARCHAR2 IN Y --性能表的所有者
NO_INVALIDATE BOOLEAN IN
收集统计信息类:
一、dbms_stats.gather_table_stats存储过程
This procedure gathers table and column (and index) statistics. It attempts to parallelize as much of the work as possible, but there are some restrictions as described in the individual parameters.
SQL> desc dbms_stats.gather_table_stats;
Parameter Type Mode Default?
---------------- -------- ---- --------
OWNNAME VARCHAR2 IN --所有者的姓名
TABNAME VARCHAR2 IN --要分析的表名
PARTNAME VARCHAR2 IN Y --要分析的分区名称
ESTIMATE_PERCENT NUMBER IN Y --采样的比例
BLOCK_SAMPLE BOOLEAN IN Y --是否块分析
METHOD_OPT VARCHAR2 IN Y --分析的方式
DEGREE NUMBER IN Y --分析的并行度
GRANULARITY VARCHAR2 IN Y --分析的粒度
CASCADE BOOLEAN IN Y --是否分析索引
STATTAB VARCHAR2 IN Y --使用的性能表名
STATID VARCHAR2 IN Y --性能表的标识
STATOWN VARCHAR2 IN Y --性能表的所有者
NO_INVALIDATE BOOLEAN IN