Re: Reset DB stats suggestion pg_stat_reset()

Поиск
Список
Период
Сортировка
От Adrian Klaver
Тема Re: Reset DB stats suggestion pg_stat_reset()
Дата
Msg-id ca20d549-5ad1-b83a-b169-1f436a9e10e2@aklaver.com
обсуждение исходный текст
Ответ на Re: Reset DB stats suggestion pg_stat_reset()  (postggen2020 s <postggen2020@gmail.com>)
Ответы Re: Reset DB stats suggestion pg_stat_reset()  (Adrian Klaver <adrian.klaver@aklaver.com>)
Re: Reset DB stats suggestion pg_stat_reset()  (Adrian Klaver <adrian.klaver@aklaver.com>)
Список pgsql-general
On 2/22/20 6:40 PM, postggen2020 s wrote:
> Thanks Adrian.
> I am aware about the functions. Here need is, can we use this?.or is 
> there any known effects after firing the functions?.

Yes the stats counters will be reset to 0, which means the planner will 
not have accurate statistics to work with. That can be corrected with an 
ANALYZE. The questions I have are:

What is the issue you are trying to deal with?

Also why do you think resetting the stats will fix it?


> 
> Thanks,
> Postgann.
> 
> On Sat, Feb 22, 2020 at 10:47 PM Adrian Klaver 
> <adrian.klaver@aklaver.com <mailto:adrian.klaver@aklaver.com>> wrote:
> 
>     On 2/22/20 12:26 AM, postggen2020 s wrote:
>      > Hi Team,
>      >
>      > Good Afternoon,
>      >
>      > 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.
> 
>     See here:
> 
>     https://www.postgresql.org/docs/12/monitoring-stats.html
> 
>     Table 27.20. Additional Statistics Functions
> 
>     It details what your options are.
> 
>      >
>      > Thanks.
>      > Postggen.
> 
> 
>     -- 
>     Adrian Klaver
>     adrian.klaver@aklaver.com <mailto:adrian.klaver@aklaver.com>
> 


-- 
Adrian Klaver
adrian.klaver@aklaver.com



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

Предыдущее
От: Edson Richter
Дата:
Сообщение: RE: Replication: slave server has 3x size of production server?
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: How to get error message details from libpq based psqlODBC driver(regression)