Обсуждение: [ADMIN] Is it safe to run pg_stat_reset() i Prod?

Поиск
Список
Период
Сортировка

[ADMIN] Is it safe to run pg_stat_reset() i Prod?

От
Gustav Karlsson
Дата:
Hi,

Am tracking unused indices and wondering if it is safe to run pg_stat_reset() i production? I.e. will pg_stat_reset()
affectstats used by the query planner in any way which could affect performance? 

Regards,
Gustav



Re: [ADMIN] Is it safe to run pg_stat_reset() i Prod?

От
Shreeyansh Dba
Дата:
Hi Gustav Karlsson,

It only resets the stats for the current database, not the cluster wide stats - pg_database is cluster wide.

Specially when values associated to inserts, updates, deleted, etc. In pg_stat_user_* get a new value after running pg_stat_reset().




On Mon, Dec 17, 2018 at 5:11 PM Gustav Karlsson <gustav.karlsson@bekk.no> wrote:
Hi,

Am tracking unused indices and wondering if it is safe to run pg_stat_reset() i production? I.e. will pg_stat_reset() affect stats used by the query planner in any way which could affect performance?

Regards,
Gustav


Re: [ADMIN] Is it safe to run pg_stat_reset() i Prod?

От
Tom Lane
Дата:
Gustav Karlsson <gustav.karlsson@bekk.no> writes:
> Am tracking unused indices and wondering if it is safe to run pg_stat_reset() i production? I.e. will pg_stat_reset()
affectstats used by the query planner in any way which could affect performance? 

The planner doesn't look at any of that data.

            regards, tom lane