• 统计信息脚本


    ------------------表统计信息---------------------------------------------------------------------
    select t.owner,t.table_name,t.tablespace_name,t.last_analyzed,t.num_rows,t.blocks,t.avg_row_len from dba_tables t;
    select t.table_owner,t.table_name,t.partition_name,t.tablespace_name,t.last_analyzed,t.num_rows,t.blocks,t.avg_row_len from dba_tab_partitions t;
    select t.table_owner,t.table_name,t.partition_name,t.subpartition_name,t.tablespace_name,t.last_analyzed,t.num_rows,t.blocks,t.avg_row_len from dba_tab_subpartitions t;
    ------------------索引统计信息---------------------------------------------------------------------
    select t.owner,t.index_name,t.table_name,t.tablespace_name,t.last_analyzed,t.blevel,t.leaf_blocks,t.clustering_factor,t.distinct_keys,t.avg_leaf_blocks_per_key,t.avg_data_blocks_per_key,t.num_rows from dba_indexes t;
    select t.index_owner,t.index_name,t.partition_name,t.last_analyzed,t.blevel,t.leaf_blocks,t.clustering_factor,t.distinct_keys,t.avg_leaf_blocks_per_key,t.avg_data_blocks_per_key,t.num_rows from dba_ind_partitions t;
    select t.index_owner,t.index_name,t.partition_name,t.subpartition_name,t.tablespace_name,t.last_analyzed,t.blevel,t.leaf_blocks,t.clustering_factor,t.distinct_keys,t.avg_leaf_blocks_per_key,t.avg_data_blocks_per_key,t.num_rows from dba_ind_subpartitions t;
    ------------------列统计信息---------------------------------------------------------------------
    select t.owner,t.table_name,t.column_name,t.last_analyzed,t.num_distinct,t.num_nulls,t.low_value,t.high_value,t.density,t.num_buckets from dba_tab_col_statistics t;
    select t.owner,t.table_name,t.partition_name,t.t.num_distinct,t.num_nulls,t.low_value,t.high_value,t.density,t.num_buckets from dba_part_col_statistics t;
    select t.num_distinct,t.num_nulls,t.low_value,t.last_analyzed,high_value,t.density,t.num_buckets from dba_subpart_col_statistics t;
    ------------------直方图统计信息----------------------------------------------------------------------
    select * from dba_tab_histograms t;
    select * from dba_part_histograms t;
    select * from dba_subpart_histograms t;
    ------------------全局统计信息---------------------------------------------------------------------
    select t.table_name,t.last_analyzed,t.global_stats from dba_tables t;
    select t.table_name,t.partition_name,t.last_analyzed,t.global_stats from dba_tab_partitions t;
    select t.table_name,t.partition_name,t.subpartition_name,t.last_analyzed,t.global_stats from dba_tab_subpartitions t;
    select t.table_name,t.column_name,t.last_analyzed,t.global_stats from dba_tab_col_statistics t;
    select t.table_name,t.partition_name,t.column_name,t.last_analyzed,t.global_stats from dba_part_col_statistics t;
    select t.index_name,t.table_name,t.last_analyzed,t.global_stats from dba_indexes t;
    select t.index_name,t.partition_name,t.last_analyzed,t.global_stats from dba_ind_partitions t;
    select t.index_name,t.partition_name,t.subpartition_name,t.last_analyzed,t.global_stats from dba_ind_subpartitions t;

  • 相关阅读:
    网络安全分析
    java实现 洛谷 P1464 Function
    java实现 洛谷 P1464 Function
    java实现 洛谷 P1014 Cantor表
    java实现 洛谷 P1014 Cantor表
    java实现 洛谷 P1014 Cantor表
    java实现 洛谷 P1014 Cantor表
    java实现 洛谷 P1014 Cantor表
    java实现 洛谷 P1540 机器
    java实现 洛谷 P1540 机器
  • 原文地址:https://www.cnblogs.com/wcwen1990/p/6660454.html
Copyright © 2020-2023  润新知