ankane/pghero

[Idea] Show transaction duration on "Live Queries" page

dtcristo opened this issue · 1 comments

I would love if PgHero could help me identify long running transactions.

I've noticed the "Duration" on the "Live Queries" page is calculated from age(NOW(), COALESCE(query_start, xact_start)) AS duration which combines query age and transaction age together.

It would be great if we could separate "transaction duration" from "query duration" into separate columns to help identify long running transactions. Right now if query_start is present, "Duration" will show the age of the current query within the transaction and not the transaction age itself.

Related, it would be good if we could order the results by either "transaction duration" or "query duration" instead of COALESCE(query_start, xact_start) DESC.

Draft PR in #478.

ankane commented

Commented in #478.