Re: Reset DB stats suggestion pg_stat_reset()

Поиск
Список
Период
Сортировка
От Michael Lewis
Тема Re: Reset DB stats suggestion pg_stat_reset()
Дата
Msg-id CAHOFxGpmuqYMxKq9bk0G7Hs7n=4KR8+Yea+Cr9+J-gLe2KcGwQ@mail.gmail.com
обсуждение исходный текст
Ответ на Reset DB stats suggestion pg_stat_reset()  (postggen2020 s <postggen2020@gmail.com>)
Список pgsql-general
We have seen some deadlocks and tempfile count in pg_stat_database view. We are trying to reset the stats. 
Can we use pg_stat_reset() function to reset these stats without any impact stats of databases.
Please advise the process to reset the stats.

Yes, you could reset stats every month or week or whatever you decide makes sense so you have an understanding of the timeline. Else, knowing that an index has been used X times since who-knows-when is not a very useful piece of information. I have occasionally reset the stats on all indexes on a table when adding or removing an index from that table so that I have an accurate idea of whether index_xyz or index_abc gets used. You can take a snapshot of the stats on the table occasionally and compare prior count to new count if you prefer. I find reset to be cleaner.

В списке pgsql-general по дате отправления:

Предыдущее
От: bvo
Дата:
Сообщение: Re: backup broken
Следующее
От: Mani Sankar
Дата:
Сообщение: LDAP with TLS is taking more time in Postgresql 11.5