Determines the behavior when cumulative statistics are accessed multiple times within a transaction. When set to
none, each access re-fetches counters from shared memory. When set to
cache, the first access to statistics for an object caches those statistics until the end of the transaction unless pg_stat_clear_snapshot() is called. When set to
snapshot, the first statistics access caches all statistics accessible in the current database, until the end of the transaction unless pg_stat_clear_snapshot() is called. The default is
none is most suitable for monitoring systems. If values are only accessed once, it is the most efficient.
cache ensures repeat accesses yield the same values, which is important for queries involving e.g. self-joins.
snapshot can be useful when interactively inspecting statistics, but has higher overhead, particularly if many database objects exist.