A
A
Anton2020-05-09 16:49:27
PostgreSQL
Anton, 2020-05-09 16:49:27

How often do you reset pg_stat_statements statistics?

pg_stat_statements collects statistics for the entire PostgreSQL instance.
This extension is commonly used by DBAs as a data source for reporting (this data is actually the sum of the counts since the counters were reset).

By default, statistics are not reset.
I understand it needs to be reset periodically. But I can't find specific recommendations.
How often do you reset pg_stat_statements statistics?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Melkij, 2020-05-09
Patsev @chemtech

We make a daily cron report, after which we call pg_stat_statements_reset. That is once a day.

K
ky0, 2020-05-09
@ky0

It depends. If you need to see the difference between, conditionally, peak hours and night / morning - once a day may turn out to be rare.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question