May 2018
Intermediate to advanced
576 pages
30h 25m
English
The collect_deltas() function makes static copies of the pg_stat_user_tables, pg_statio_user_tables, pg_stat_user_indexes, and pg_statio_user_indexes tables at each run. It then compares the current copies with the copies saved at the last run, and saves the timestamped deltas in the stat_user_tables_delta_log and stat_user_indexes_delta_log log tables. These tables can then be analyzed later to get an insight into access and I/O patterns.
The latest set of deltas is also kept in the stat_user_tables_delta and stat_user_indexes_delta tables, which can be used for external monitoring systems, such as Cacti, to get a graphical representation of it.