Created
June 20, 2018 19:35
-
-
Save jamie-ga/36543b8df139a2907bd801e90e09a2b1 to your computer and use it in GitHub Desktop.
Measuring / profiling postgres queries
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT query, calls, total_time, rows, | |
100.0 * shared_blks_hit / nullif(shared_blks_hit + shared_blks_read, 0) AS hit_percent | |
FROM pg_stat_statements ORDER BY total_time DESC LIMIT 100; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment