postgresql数据库查询慢SQL

--查询总耗时最长SQL
select * from pg_stat_statements order by total_time desc;
--查询平均耗时最长SQL
select * from pg_stat_statements order by mean_time desc;

--查询调用次数最多SQL
select * from pg_stat_statements order by calls desc;

 

posted on 2018-07-11 18:48  编程Groot  阅读(1806)  评论(0编辑  收藏  举报