Skip to content

Instantly share code, notes, and snippets.

@Madusudanan
Created May 16, 2016 13:16
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Madusudanan/cf41ad220182f1d2595677572303e34a to your computer and use it in GitHub Desktop.
Save Madusudanan/cf41ad220182f1d2595677572303e34a to your computer and use it in GitHub Desktop.
SELECT
(total_time / 1000 / 60)::decimal as total_minutes,
(total_time/calls)::decimal as average_time,
query
FROM pg_stat_statements
ORDER BY 1 DESC
LIMIT 100;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment