Re: Long running queries - Mailing list pgsql-admin

From Wells Oliver
Subject Re: Long running queries
Date
Msg-id CAOC+FBX4TupXcNRWUoTb0QGmTxYPg0_Z+_PvhtTAYRQFrqPyGA@mail.gmail.com
Whole thread Raw
In response to Long running queries  (Clive Swan <cliveswan@gmail.com>)
List pgsql-admin
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@gmail.com> wrote:
Greetings 
SQL Server has a handy SQL "tool" to spot expensive and/or long running queries.

Is there a similar query/tool for Postgresql??

Thanks
Clive


--

pgsql-admin by date:

Previous
From: Clive Swan
Date:
Subject: Long running queries
Next
From: Scott Ribe
Date:
Subject: Re: Long running queries