Created
February 6, 2020 09:23
-
-
Save dedunumax/a0542b83d4d672eabbf7a17a8ed9dac3 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
pid, | |
now() - pg_stat_activity.query_start AS duration, | |
query, | |
state | |
FROM pg_stat_activity | |
WHERE (now() - pg_stat_activity.query_start) > interval '5 minutes' | |
ORDER BY duration DESC; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment