Are your SQL statements becoming expensive? Get a better view with pg_stat_plans!

Posted on 2012-10-23 by 2ndQuadrant, an EDB Company

2ndQuadrant is pleased to announce the release of pg_stat_plans 1.0 beta, an enhanced SQL monitoring and tuning open source tool.

The tool is a further improvement of the pg_stat_statements module that is distributed with Postgres 9.2, a release in which the module was heavily improved by 2ndQuadrant to make it usable by applications that do not use prepared statements.

pg_stat_plans allows you to view the most frequent and expensive SQL statements in your applications, just as many other tools allow. The tool is unique in its ability to offer an SQL query that can be EXPLAINed to view the actual plan, rather than merely a similar plan.

pg_stat_plans lists SQL statements by plan, not just by query, which allows it to diagnose even complex cases where a single SQL statement returns multiple plans when different parameters are utilised. pg_stat_plans is a variant of the standard Postgres contrib module pg_stat_statements.

With this release, the module works only with 9.2. In response to strong demand from 2ndQuadrant customers, an explicit goal of pg_stat_plans is to support Postgres 9.0 and 9.1.

Please visit the official pg_stat_plans page for more information and to download the beta: http://www.2ndQuadrant.com/en/pg_stat_plans