postgresql 查看tablespace命中率 博客分类: postgresql
程序员文章站
2024-02-25 08:50:40
...
SELECT a.datname,
pg_size_pretty(pg_database_size(a.datid)) AS size,
CAST(blks_hit / (blks_read + blks_hit + 0.000001) * 100.0 AS
NUMERIC(5, 2)) AS cache,
CAST(xact_commit / (xact_rollback + xact_commit + 0.000001) * 100.0 AS
NUMERIC(5, 2)) AS success
FROM pg_stat_database a
ORDER BY pg_database_size(a.datid) DESC;
pg_size_pretty(pg_database_size(a.datid)) AS size,
CAST(blks_hit / (blks_read + blks_hit + 0.000001) * 100.0 AS
NUMERIC(5, 2)) AS cache,
CAST(xact_commit / (xact_rollback + xact_commit + 0.000001) * 100.0 AS
NUMERIC(5, 2)) AS success
FROM pg_stat_database a
ORDER BY pg_database_size(a.datid) DESC;
推荐阅读
-
postgres常用查询集锦 博客分类: postgresql
-
postgresql 查看tablespace命中率 博客分类: postgresql
-
postgresql 中常用小语法 博客分类: postgresql
-
pg提取序列号 博客分类: postgresql
-
postgresql源码安装 博客分类: postgresql
-
postgres窗口函数实例(取出每日中前N条数据) 博客分类: postgresql
-
postgresql 查看tablespace命中率 博客分类: postgresql
-
postgres常用查询集锦 博客分类: postgresql
-
postgres窗口函数实例(取出每日中前N条数据) 博客分类: postgresql
-
postgresql 外部文件表 博客分类: postgresql