I have this essentially bookmarked and query it often. I actually have a Slackbot running that yells at people if they show up in the results.
SELECT * FROM pg_stat_activity WHERE usename IS NOT NULL AND state = 'active' AND query_start <= NOW() - INTERVAL '60 minutes'; -- Long query
On Wed, Jan 25, 2023 at 9:55 AM Clive Swan <cliveswan@xxxxxxxxx> wrote:
GreetingsSQL Server has a handy SQL "tool" to spot expensive and/or long running queries.
Is there a similar query/tool for Postgresql??
ThanksClive
Wells Oliver
wells.oliver@xxxxxxxxx
wells.oliver@xxxxxxxxx