From: | Michael Lewis <mlewis(at)entrata(dot)com> |
---|---|
To: | postggen2020 s <postggen2020(at)gmail(dot)com> |
Cc: | pgsql-general <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Reset DB stats suggestion pg_stat_reset() |
Date: | 2020-02-24 17:54:53 |
Message-ID: | CAHOFxGpmuqYMxKq9bk0G7Hs7n=4KR8+Yea+Cr9+J-gLe2KcGwQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin 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.
From | Date | Subject | |
---|---|---|---|
Next Message | soumik.bhattacharjee | 2020-02-24 19:33:09 | ZABBIX - For PostgreSQL Monitoring GUI based |
Previous Message | bricklen | 2020-02-24 17:15:49 | Re: benchmarking proposed config |
From | Date | Subject | |
---|---|---|---|
Next Message | Mani Sankar | 2020-02-24 19:50:21 | LDAP with TLS is taking more time in Postgresql 11.5 |
Previous Message | Merlin Moncure | 2020-02-24 16:34:03 | Re: DB running out of memory issues after upgrade |