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);
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 ...
Get PostgreSQL High Performance Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.