An advanced PostgreSQL extension for query performance monitoring, aggregating statistics in configurable time buckets.
pg_stat_monitor is a PostgreSQL extension for monitoring and analyzing query performance. It collects and aggregates query execution statistics in configurable time buckets, providing detailed insights into query origins, execution plans, and performance metrics. It solves the problem of fragmented query performance data by offering a consolidated view that helps database administrators and developers debug and optimize SQL queries.
Database administrators, DevOps engineers, and backend developers who manage PostgreSQL databases and need detailed query performance insights for tuning and troubleshooting.
Developers choose pg_stat_monitor over alternatives like pg_stat_statements because it provides aggregated statistics in time-based buckets, captures actual query parameters and execution plans, and offers multi-dimensional grouping for more precise analysis, all in a single view.
Query Performance Monitoring Tool for PostgreSQL
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Aggregates statistics into configurable time buckets, enabling accurate analysis of performance patterns within specific windows instead of ever-increasing counts.
Groups data by user, database, query, and other dimensions for precise drill-down, offering higher granularity than pg_stat_statements.
Captures real parameter values in queries, simplifying debugging by allowing direct execution of captured queries without guesswork.
Stores the actual execution plan for each SQL statement, helping identify performance bottlenecks directly from the database.
Requires modifying shared_preload_libraries and restarting PostgreSQL, which can be disruptive and isn't feasible in all environments.
Only supports PostgreSQL versions 14 and above, excluding older databases still in use.
When both extensions are loaded, memory and WAL statistics display inconsistently, as noted in the README, complicating joint usage.