Last active
February 10, 2022 11:13
-
-
Save Charmatzis/58956f8a8955ada1cf09459148269d1b to your computer and use it in GitHub Desktop.
Postgres - Most expensive 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 round(( 100 * total_time / sum(total_time) over ())::numeric, 2) percent, | |
round(total_time::numeric, 2) as total, | |
calls, | |
round(mean_time::numeric, 2) as mean, | |
stddev_time, | |
query | |
from pg_stat_statements | |
order by total_time DESC | |
limit 10; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment