DEFINITIONS
Definitions More Info.
Definition ID
850
Title
POSTGRESQL
Category
NOTES
Definition
Finding and killing all long running queries on PostgreSQL
Definition Description
https://medium.com/little-programming-joys/finding-and-killing-long-running-queries-on-postgres-7c4f0449e86d
9.1
=======
SELECT
procpid,
NOW() - pg_stat_activity.query_start AS duration,
current_query,
waiting
FROM
pg_stat_activity
WHERE
( NOW() - pg_stat_activity.query_start ) > INTERVAL '5 minutes';
9.2 SONRASI
===========
SELECT
pid,
NOW() - pg_stat_activity.query_start AS duration,
query,
state
FROM
pg_stat_activity
WHERE
( NOW() - pg_stat_activity.query_start ) > INTERVAL '5 minutes';
RecordBy
cunay
Record Date
18-06-2018 12:30:03
Düzenle
Kopyala
Sil