pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Reseting statistics counters
4+ messages / 4 participants
[nested] [flat]

* Reseting statistics counters
@ 2013-10-01 11:50 Xenofon Papadopoulos <xpapad@gmail.com>
  2013-10-01 11:56 ` Re: Reseting statistics counters Pavel Stehule <pavel.stehule@gmail.com>
  2013-11-16 19:49 ` Re: Reseting statistics counters Strahinja Kustudić <strahinjak@nordeus.com>
  0 siblings, 2 replies; 4+ messages in thread

From: Xenofon Papadopoulos @ 2013-10-01 11:50 UTC (permalink / raw)
  To: pgsql-performance

If we reset the statistics counters using pg_stat_reset() will it affect
the performance of the database? Eg are these the same statistics used by
the planner?
Thanks

^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Reseting statistics counters
  2013-10-01 11:50 Reseting statistics counters Xenofon Papadopoulos <xpapad@gmail.com>
@ 2013-10-01 11:56 ` Pavel Stehule <pavel.stehule@gmail.com>
  1 sibling, 0 replies; 4+ messages in thread

From: Pavel Stehule @ 2013-10-01 11:56 UTC (permalink / raw)
  To: Xenofon Papadopoulos <xpapad@gmail.com>; +Cc: pgsql-performance

Hello


2013/10/1 Xenofon Papadopoulos <xpapad@gmail.com>

> If we reset the statistics counters using pg_stat_reset() will it affect
> the performance of the database? Eg are these the same statistics used by
> the planner?
> Thanks
>
>
these statistics are used only for autovacuum, what I know. So you can
impact a autovacuum, but no planner

Regards

Pavel

^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Reseting statistics counters
  2013-10-01 11:50 Reseting statistics counters Xenofon Papadopoulos <xpapad@gmail.com>
@ 2013-11-16 19:49 ` Strahinja Kustudić <strahinjak@nordeus.com>
  2013-12-06 23:31   ` Re: Reseting statistics counters Tomas Vondra <tv@fuzzy.cz>
  1 sibling, 1 reply; 4+ messages in thread

From: Strahinja Kustudić @ 2013-11-16 19:49 UTC (permalink / raw)
  To: Xenofon Papadopoulos <xpapad@gmail.com>; +Cc: pgsql-performance

Sorry for the late reply, but as far as I know when you run pg_stat_reset()
you should always run analyze manually of the database to populate the
statistics.


Strahinja Kustudić | Lead System Engineer | Nordeus


On Tue, Oct 1, 2013 at 1:50 PM, Xenofon Papadopoulos <xpapad@gmail.com>wrote:

> If we reset the statistics counters using pg_stat_reset() will it affect
> the performance of the database? Eg are these the same statistics used by
> the planner?
> Thanks
>
>

^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Reseting statistics counters
  2013-10-01 11:50 Reseting statistics counters Xenofon Papadopoulos <xpapad@gmail.com>
  2013-11-16 19:49 ` Re: Reseting statistics counters Strahinja Kustudić <strahinjak@nordeus.com>
@ 2013-12-06 23:31   ` Tomas Vondra <tv@fuzzy.cz>
  0 siblings, 0 replies; 4+ messages in thread

From: Tomas Vondra @ 2013-12-06 23:31 UTC (permalink / raw)
  To: pgsql-performance

On 16.11.2013 20:49, Strahinja Kustudić wrote:
> Sorry for the late reply, but as far as I know when you run 
> pg_stat_reset() you should always run analyze manually of the
> database to populate the statistics.

Why?

There are two kinds of stats in the database - stats used by the planner
(common column values, histograms, ...) and runtime stats. pg_stat_reset
only deals with the latter, it won't discard histograms or anything like
that.

And runnning analyze won't magically populate the runtime stats - for
example how could it populate number of sequential/index scans or the
timestamp of the last autovacuum?

The only thing that may be influenced by this is autovacuum, because
this will remove timestamp of the last run on the tables, number of
deleted/dead tuples etc. So it will be invoked on all tables, collecting
this info.

regards
Tomas


-- 
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance



^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2013-12-06 23:31 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2013-10-01 11:50 Reseting statistics counters Xenofon Papadopoulos <xpapad@gmail.com>
2013-10-01 11:56 ` Pavel Stehule <pavel.stehule@gmail.com>
2013-11-16 19:49 ` Strahinja Kustudić <strahinjak@nordeus.com>
2013-12-06 23:31   ` Tomas Vondra <tv@fuzzy.cz>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox