Below is a script to check queries that are running for more than 15 minutes.
SELECT datname,query,state,query_start, now() - query_start AS query_time FROM pg_stat_activity WHERE (now() - query_start) > interval '15 minutes';
Cheers!
Below is a script to check queries that are running for more than 15 minutes.
SELECT datname,query,state,query_start, now() - query_start AS query_time FROM pg_stat_activity WHERE (now() - query_start) > interval '15 minutes';
Cheers!
Leave a Reply