Created
April 16, 2014 15:42
-
-
Save danp/10896220 to your computer and use it in GitHub Desktop.
whatsup.sql
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 | |
client_addr || ':' || client_port as client, | |
substr(query, 0, 100) as query, | |
waiting, | |
state, | |
now() - xact_start as xact_for | |
from | |
pg_stat_activity | |
where | |
state <> 'idle' | |
order by xact_for desc; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment