Table access statistics

In this recipe, we will be discussing how to study the table access statistics by using PostgreSQL catalog views.

Getting ready

PostgreSQL's statistics collector process keeps track of all kinds of operations that are performing on any table or an index. These statistics will be helpful in determining the importance of an object in the business, and also defines whether the required maintenance operations are running on it when it is required.

How to do it...

Let's create a test table, which we will perform a few operations on:

postgres=# CREATE TABLE test (t INT); 

PostgreSQL provides a few catalog views, which we are going to query to analyze the statistics, which statistics collector process is collected in ...

Get PostgreSQL High Performance Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.