May 2019
Intermediate to advanced
600 pages
20h 46m
English
If you are sure that you have no use for the cumulative statistics gathered by PostgreSQL, you can just reset all table statistics by executing the following command:
SELECT pg_stat_reset();
This sets all statistics to zero, and you can detect table use by just looking for tables where any usage count is not zero.
Of course, you can make a backup copy of the statistics table first, as follows:
CREATE TABLE backup_stat_user_tables AS SELECT current_timestamp AS snaptime,* FROM pg_stat_user_tables;
Read now
Unlock full access