磨砺技术珠矶,践行数据之道,追求卓越价值
回到上一级页面:PostgreSQL基础知识与基本操作索引页 回到顶级页面:PostgreSQL索引页
作者:高健@博客园 luckyjackgao@gmail.com
参考:http://blog.2ndquadrant.com/measuring_postgresql_checkpoin/
执行前:
select pg_stat_reset();
select pg_stat_reset_shared('bgwriter');
待测试程序执行完毕后:
SELECT
total_checkpoints,
seconds_since_start / total_checkpoints / 60 AS minutes_between_checkpoints
FROM
(SELECT
EXTRACT(EPOCH FROM (now() - pg_postmaster_start_time())) AS seconds_since_start
(checkpoints_timed+checkpoints_req) AS total_checkpoints,
FROM pg_stat_bgwriter
) AS sub;
作者:高健@博客园 luckyjackgao@gmail.com
回到上一级页面:PostgreSQL基础知识与基本操作索引页 回到顶级页面:PostgreSQL索引页
磨砺技术珠矶,践行数据之道,追求卓越价值