Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

App to monitor PostgreSQL queries in real time?

I'd like to monitor the queries getting sent to my database from an application. To that end, I've found pg_stat_activity, but more often then not, the rows which are returned read " in transaction". I'm either doing something wrong, am not fast enough to see the queries come through, am confused, or all of the above!

Can someone recommend the most idiot-proof way to monitor queries running against PostgreSQL? I'd prefer some sort of easy-to-use UI based solution (example: SQL Server's "Profiler"), but I'm not too choosy.

like image 419
Russell Christopher Avatar asked Dec 21 '11 22:12

Russell Christopher


People also ask

Is PostgreSQL real time database?

Realtime is a server that listens to changes in your PostgreSQL database and broadcasts the changes to clients through a websocket connection.

What is pgAnalyze?

This is a Go-based daemon which collects various information about Postgres databases as well as queries run on it. All data is converted to a protocol buffers structure which can then be used as data source for monitoring & graphing systems.

How do you analyze a query performance in PostgreSQL?

The most powerful tool at our disposal for understanding and optimizing SQL queries is EXPLAIN ANALYZE , which is a Postgres command that accepts a statement such as SELECT ... , UPDATE ... , or DELETE ... , executes the statement, and instead of returning the data provides a query plan detailing what approach the ...


1 Answers

PgAdmin offers a pretty easy-to-use tool called server monitor

(Tools ->ServerStatus)

like image 192
ertx Avatar answered Sep 25 '22 22:09

ertx