pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
[ADMIN] Is it safe to run pg_stat_reset() i Prod?
3+ messages / 3 participants
[nested] [flat]

* [ADMIN] Is it safe to run pg_stat_reset() i Prod?
@ 2018-12-17 11:41  Gustav Karlsson <gustav.karlsson@bekk.no>
  0 siblings, 2 replies; 3+ messages in thread

From: Gustav Karlsson @ 2018-12-17 11:41 UTC (permalink / raw)
  To: pgsql-admin

Hi,

Am tracking unused indices and wondering if it is safe to run pg_stat_reset() i production? I.e. will pg_stat_reset() affect stats used by the query planner in any way which could affect performance?

Regards,
Gustav





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

* Re: [ADMIN] Is it safe to run pg_stat_reset() i Prod?
@ 2018-12-17 12:33  Shreeyansh Dba <shreeyansh2014@gmail.com>
  parent: Gustav Karlsson <gustav.karlsson@bekk.no>
  1 sibling, 0 replies; 3+ messages in thread

From: Shreeyansh Dba @ 2018-12-17 12:33 UTC (permalink / raw)
  To: Gustav Karlsson <gustav.karlsson@bekk.no>; +Cc: pgsql-admin

Hi Gustav Karlsson,

It only resets the stats for the current database, not the cluster wide
stats - pg_database is cluster wide.

Specially when values associated to inserts, updates, deleted, etc. In
pg_stat_user_* get a new value after running pg_stat_reset().

<http://www.shreeyansh.com;


On Mon, Dec 17, 2018 at 5:11 PM Gustav Karlsson <gustav.karlsson@bekk.no>
wrote:

> Hi,
>
> Am tracking unused indices and wondering if it is safe to run
> pg_stat_reset() i production? I.e. will pg_stat_reset() affect stats used
> by the query planner in any way which could affect performance?
>
> Regards,
> Gustav
>
>
>

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

* Re: [ADMIN] Is it safe to run pg_stat_reset() i Prod?
@ 2018-12-17 14:28  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Gustav Karlsson <gustav.karlsson@bekk.no>
  1 sibling, 0 replies; 3+ messages in thread

From: Tom Lane @ 2018-12-17 14:28 UTC (permalink / raw)
  To: Gustav Karlsson <gustav.karlsson@bekk.no>; +Cc: pgsql-admin

Gustav Karlsson <gustav.karlsson@bekk.no> writes:
> Am tracking unused indices and wondering if it is safe to run pg_stat_reset() i production? I.e. will pg_stat_reset() affect stats used by the query planner in any way which could affect performance?

The planner doesn't look at any of that data.

			regards, tom lane




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


end of thread, other threads:[~2018-12-17 14:28 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-12-17 11:41 [ADMIN] Is it safe to run pg_stat_reset() i Prod? Gustav Karlsson <gustav.karlsson@bekk.no>
2018-12-17 12:33 ` Shreeyansh Dba <shreeyansh2014@gmail.com>
2018-12-17 14:28 ` Tom Lane <tgl@sss.pgh.pa.us>

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