From: hubert depesz lubaczewski <depesz@depesz.com>
To: Rushikesh socha <rushikesh.s@gmail.com>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: Exact same output - pg_stat_statements
Date: Mon, 2 Jan 2023 14:34:13 +0100
Message-ID: <Y7LdVeKa2kq0gOPq@depesz.com> (raw)
In-Reply-To: <CANgP4OLwgNE8isVwah5+3Aywh7Dq9N=8oHOBxOAzVtz8+G9DTw@mail.gmail.com>
References: <CANgP4OLwgNE8isVwah5+3Aywh7Dq9N=8oHOBxOAzVtz8+G9DTw@mail.gmail.com>
On Fri, Dec 30, 2022 at 11:04:59AM -0500, Rushikesh socha wrote:
> Hi, Whenever I am running the below query on one of my Azure PostgreSQL
> PaaS instances I am getting exact same output. I feel it shows old
> information but as far as i know pg_stat_statements only shows current
> information and not past right ? It may be a bug?
pg_stat_statements has all the data since last reset of stats.
So if you never reset stats, it accumulated data for howeve rlong you
are using pg.
Not really surprising that top total-time uses are the same.
If you want to sensibly use it you should call reset function every now
and then.
Best regards,
depesz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: depesz@depesz.com, rushikesh.s@gmail.com
Subject: Re: Exact same output - pg_stat_statements
In-Reply-To: <Y7LdVeKa2kq0gOPq@depesz.com>
References: <CANgP4OLwgNE8isVwah5+3Aywh7Dq9N=8oHOBxOAzVtz8+G9DTw@mail.gmail.com> <Y7LdVeKa2kq0gOPq@depesz.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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