【问题标题】:How to analyze a table using DBMS_STATS package in PL/SQL?如何在 PL/SQL 中使用 DBMS_STATS 包分析表?
【发布时间】:2016-07-28 03:00:51
【问题描述】:

这是我正在处理的代码:

begin
    DBMS_STATS.GATHER_TABLE_STATS (ownname => 'appdata' , 
    tabname => 'TRANSACTIONS',
    cascade => true, 
    estimate_percent => DBMS_STATS.AUTO_SAMPLE_SIZE,
    method_opt=>'for all indexed columns size 1', 
    granularity => 'ALL', 
    degree => 1);
end;

执行代码后,显示PL/SQL procedure successfully completed

如何查看由 DBMS_STATS 分析的特定表的统计信息?

【问题讨论】:

    标签: oracle performance plsql oracle11g


    【解决方案1】:

    您可以在DBA_TABLES看到信息

    SELECT * 
    FROM DBA_TABLES where table_name='TRANSACTIONS';
    

    例如LAST_ANALYZED 列显示上次分析的时间。

    中也有逐列的信息
    SELECT * FROM all_tab_columns where table_name='TRANSACTIONS';
    

    您可以在哪里找到最小值、最大值等。

    【讨论】:

    • 谢谢你的回答:)
    猜你喜欢
    • 1970-01-01
    • 2018-05-21
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-05-28
    • 1970-01-01
    • 2015-01-23
    相关资源
    最近更新 更多