From: | Wells Oliver <wells(dot)oliver(at)gmail(dot)com> |
---|---|
To: | Clive Swan <cliveswan(at)gmail(dot)com> |
Cc: | "pgsql-admin(at)lists(dot)postgresql(dot)org" <pgsql-admin(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Long running queries |
Date: | 2023-01-25 17:56:50 |
Message-ID: | CAOC+FBX4TupXcNRWUoTb0QGmTxYPg0_Z+_PvhtTAYRQFrqPyGA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(at)gmail(dot)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
>
--
Wells Oliver
wells(dot)oliver(at)gmail(dot)com <wellsoliver(at)gmail(dot)com>
From | Date | Subject | |
---|---|---|---|
Next Message | Scott Ribe | 2023-01-25 17:57:58 | Re: Long running queries |
Previous Message | Clive Swan | 2023-01-25 17:55:36 | Long running queries |