Postgresql similar of SQL Server Query Store

monitoringperformancepostgresqlpostgresql-performance

Is there any extension available for Postgresql that is similar to SQL Server query store. So that it can help identify performance bottleneck.

SQL Server query store provides information on how many times query executed, resource consumption per query. https://docs.microsoft.com/en-us/sql/relational-databases/performance/monitoring-performance-by-using-the-query-store?view=sql-server-ver15 provides more detail on query store.

Best Answer

Yes there is such an extension: pg_stat_statements

The pg_stat_statements module provides a means for tracking execution statistics of all SQL statements executed by a server.

Tools like PoWA use this extension and provide others performance metrics that you might be interested in.