Postgres Get Running Query

[Solved] Postgres Get Running Query | Sql - Code Explorer | yomemimo.com
Question : postgres get running query

Answered by : tender-thrush-7o3x3wn047p4

--Version > 9.2
SELECT pid, age(clock_timestamp(), query_start), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;

Source : | Last Update : Thu, 16 Apr 20

Answers related to postgres get running query

Code Explorer Popular Question For Sql