作者
digoal
日期
2019-05-20
标签
PostgreSQL , powa , PostreSQL Workload Analyzer
背景
PoWA (PostgreSQL Workload Analyzer) is a performance tool for PostgreSQL 9.4 and newer allowing to collect, aggregate and purge statistics on multiple PostgreSQL instances from various Stats Extensions.
PoWA通过一些插件来统计PG数据库的允许数据,同时进行分析和诊断。
依赖插件如下:
1、pg_stat_statements,TOP SQL统计
2、pg_qualstats,SQL的真实过滤性、选择性统计(where, join),用于判断是否需要索引
3、pg_stat_kcache,buffer,os cache, disk HINT统计
4、pg_wait_sampling,等待事件采样统计很容易说明问题的根源
《PostgreSQL Oracle 兼容性之 - performance insight - AWS performance insight 理念与实现解读 - 珍藏级》
《PostgreSQL 等待事件 及 等待采样统计(pg_wait_sampling)》
5、pg_track_settings,跟踪数据库配置的改变
6、HypoPG,虚拟索引(用于索引推荐)
支持远程采集数据,支持将数据存储到其他PG数据库。
例子
qps
hit
SQL洞察
等待时间统计
索引推荐
参考
https://rjuju.github.io/postgresql/2019/05/17/powa-4-with-remote-mode-beta-is-available.html
https://powa.readthedocs.io/en/latest/
https://demo-powa.anayrat.info/
PostgreSQL 许愿链接
您的愿望将传达给PG kernel hacker、数据库厂商等, 帮助提高数据库产品质量和功能, 说不定下一个PG版本就有您提出的功能点. 针对非常好的提议,奖励限量版PG文化衫、纪念品、贴纸、PG热门书籍等,奖品丰富,快来许愿。开不开森.
9.9元购买3个月阿里云RDS PostgreSQL实例
PostgreSQL 解决方案集合
德哥 / digoal's github - 公益是一辈子的事.





