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
} ;