-
-
Save scottmcclung/8eaa8e2cff865b3ae0f4ac97065b1e35 to your computer and use it in GitHub Desktop.
Revisions
-
romuald revised this gist
Oct 3, 2016 . 1 changed file with 2 additions and 3 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,5 @@ SELECT user, pid, client_addr, waiting, query, query_start, NOW() - query_start AS elapsed FROM pg_stat_activity WHERE query != '<IDLE>' -- AND EXTRACT(EPOCH FROM (NOW() - query_start)) > 1 ORDER BY elapsed DESC; -
romuald revised this gist
Aug 26, 2016 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -3,4 +3,4 @@ SELECT FROM pg_stat_activity WHERE current_query != '<IDLE>' -- AND EXTRACT(EPOCH FROM (NOW() - query_start)) > 1 ORDER BY elapsed DESC; -
romuald created this gist
Aug 24, 2016 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,6 @@ SELECT datname, procpid, usename, current_query, waiting, xact_start, query_start, client_addr, NOW() - query_start AS elapsed FROM pg_stat_activity WHERE current_query != '<IDLE>' -- AND EXTRACT(EPOCH FROM (NOW() - query_start)) > 1 ORDER elapsed DESC;