Re: Should the docs have a warning about pg_stat_reset()?

Поиск
Список
Период
Сортировка
От David Rowley
Тема Re: Should the docs have a warning about pg_stat_reset()?
Дата
Msg-id CAKJS1f92xUWun6tarsA8iioE1H-_a=67MkKZLf663Ywgf2_=zQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Should the docs have a warning about pg_stat_reset()?  (Bruce Momjian <bruce@momjian.us>)
Список pgsql-hackers
On Thu, 11 Apr 2019 at 06:52, Bruce Momjian <bruce@momjian.us> wrote:
>
> OK, let me step back.  Why are people resetting the statistics
> regularly?  Based on that purpose, does it make sense to clear the
> stats that effect autovacuum?

I can't speak for everyone, but once upon a time when I first started
using PostgreSQL, to monitor the application's use of the database I
recorded the output of pg_stat_user_tables once per day and then reset
the statistics.  It was useful to know the number of inserted tuples,
seq scans, index scans etc so I could understand the load on the
database better.   Of course, nowadays with LEAD()/LAG() it's pretty
easy to find the difference from the previous day. I'd have done it
differently if those had existed back then.

-- 
 David Rowley                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services



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

Предыдущее
От: Stephen Frost
Дата:
Сообщение: Re: [PATCH v20] GSSAPI encryption support
Следующее
От: "Iwata, Aya"
Дата:
Сообщение: RE: Contribution to Perldoc for TestLib module in Postgres