Re: Is there a way to know write statistics on an individual index

From: Maciek Sakrejda <m(dot)sakrejda(at)gmail(dot)com>
To: David Rowley <dgrowleyml(at)gmail(dot)com>
Cc: higherone <higherone(at)gmail(dot)com>, "pgsql-generallists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Is there a way to know write statistics on an individual index
Date: 2022-12-09 06:05:57
Message-ID: CAOtHd0D7Q95Gdu8Ly=vsx=MmsQnj29oTuPYx+4JTWyFsfQ_xQQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Dec 8, 2022 at 2:53 AM David Rowley <dgrowleyml(at)gmail(dot)com> wrote:
>
> On Thu, 8 Dec 2022 at 19:59, higherone <higherone(at)gmail(dot)com> wrote:
> > I know there's a pg_stats_user_indexes that gives statistics about the index scans/fetches, but I don't find any information about how many writes(insert/update/delete) happen on this individual index.
> > Is there some tool that could achieve this?
>
> Is this a partial index? If not, those should just increase at the
> same rate that's mentioned in pg_stat_user_tables for the table that
> the index belongs to.

Well, not deletes, right? And HOT updates won't affect indexes either,
so they should be subtracted from n_tup_upd.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Thomas Boussekey 2022-12-09 06:37:09 Re: Inheritance pg_largeobject table
Previous Message Ron 2022-12-09 05:27:14 Re: Inheritance pg_largeobject table