Home  >  Article  >  Database  >  dbms_stats

dbms_stats

WBOY
WBOYOriginal
2016-06-07 16:06:291402browse

dbms_stats所有的功能包如下: GATHER_INDEX_STATS:分析索引信息 GATHER_TABLE_STATS:分析表信息,当cascade为true时,分析表、列(索引)信息 GATHER_SCHEMA_STATS:分析方案信息 GATHER_DATABASE_STATS:分析数据库信息 GATHER_SYSTEM_STATS:分析系统信

dbms_stats所有的功能包如下:

GATHER_INDEX_STATS:分析索引信息

GATHER_TABLE_STATS:分析表信息,当cascade为true时,分析表、列(索引)信息

GATHER_SCHEMA_STATS:分析方案信息

GATHER_DATABASE_STATS:分析数据库信息

GATHER_SYSTEM_STATS:分析系统信息

 

EXPORT_COLUMN_STATS:导出列的分析信息

EXPORT_INDEX_STATS:导出索引分析信息

EXPORT_SYSTEM_STATS:导出系统分析信息

EXPORT_TABLE_STATS:导出表分析信息

EXPORT_SCHEMA_STATS:导出方案分析信息

EXPORT_DATABASE_STATS:导出数据库分析信息


IMPORT_COLUMN_STATS:导入列分析信息

IMPORT_INDEX_STATS:导入索引分析信息

IMPORT_SYSTEM_STATS:导入系统分析信息

IMPORT_TABLE_STATS:导入表分析信息

IMPORT_SCHEMA_STATS:导入方案分析信息

IMPORT_DATABASE_STATS:导入数据库分析信息

 

exec dbms_stats.gather_schema_stats(
ownname => 'SCOTT',
options => 'GATHER AUTO',
estimate_percent => dbms_stats.auto_sample_size,
method_opt => 'for all columns size repeat',
degree => 15
);

 

exec dbms_stats.gather_table_stats(OWNNAME=>'tccs',tabname=>'emp',cascade=>true);

ANALYZE

{ TABLE [ schema.]table

[ PARTITION ( partition ) | SUBPARTITION ( subpartition ) ]

| INDEX [ schema. ]index

[ PARTITION ( partition ) | SUBPARTITION ( subpartition ) ]

| CLUSTER [ schema. ]cluster

}

{ COMPUTE [ SYSTEM ] STATISTICS [for_clause]

| ESTIMATE [ SYSTEM ] STATISTICS [for_clause][SAMPLE integer { ROWS | PERCENT }]

| validation_clauses

| LIST CHAINED ROWS [ into_clause ]

| DELETE [ SYSTEM ] STATISTICS

} ;

 

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn