In this recipe, we will be discussing how to study the table access statistics by using PostgreSQL catalog views.
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.
Let's create a test table, which we will perform a few operations on:
postgres=# CREATE TABLE test (t INT); CREATE TABLE
PostgreSQL provides a few catalog views, which we are going to query to analyze the statistics, which statistics collector process is collected in ...