O'Reilly logo

PostgreSQL 9 Administration Cookbook - Second Edition by Simon Riggs, Gianni Ciolli, Hannu Krosing, Gabriele Bartolini

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Analyzing the real-time performance of your queries

This recipe is mainly for users of PostgreSQL 9.2 and above, and it is about the pg_stat_statements extension. Even though this extension is available in PostgreSQL 8.4, it lacks a crucial feature—query normalization.

The pg_stat_statements extension adds the capability to track execution statistics of queries that are run in a database, including the number of calls, total execution time, total number of returned rows, as well as internal information on memory and I/O access.

It is evident how this approach opens up new opportunities in PostgreSQL performance analysis—by allowing DBAs to get insights directly from the database, through SQL and in real time.

Getting ready

The pg_stat_statements ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required