sql 获取特定表的IO统计信息

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sql 获取特定表的IO统计信息相关的知识,希望对你有一定的参考价值。

select relname         as "table",
       heap_blks_read  as "heap from disc",
       heap_blks_hit   as "heap from cache",
       idx_blks_read   as "index from disc",
       idx_blks_hit    as "index from cache",
       toast_blks_read as "toast from disc",
       toast_blks_hit  as "toast from cache",
       tidx_blks_read  as "toast index disc",
       tidx_blks_hit   as "toast index cache"
  from pg_statio_user_tables
 where relname = 'TABLE_NAME';

以上是关于sql 获取特定表的IO统计信息的主要内容,如果未能解决你的问题,请参考以下文章

sql 读取特定表的增强活动统计信息

SQL调优技巧:统计信息(文末福利)

SQL执行异常系列之——统计信息不准

统计信息锁住导致收集统计信息失败引起sql执行异常

sql 列出PostgreSQL中特定表的列信息

sql 查询特定系统进程SPID的事件统计信息