pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Ayub M <hiayub@gmail.com>
To: PostgreSQL General <pgsql-general@lists.postgresql.org>
Subject: Re: postgres index usage count too high
Date: Thu, 29 Apr 2021 08:41:51 +0200
Message-ID: <c31f7c19a5ec70f3a5af5db9b3323450d0bee913.camel@cybertec.at> (raw)
In-Reply-To: <CAOS0qEsUg2GegBnyN5tpbnKxSxxP22d07fc_fZmgfQApgnKh_Q@mail.gmail.com>
References: <CAOS0qEsUg2GegBnyN5tpbnKxSxxP22d07fc_fZmgfQApgnKh_Q@mail.gmail.com>

On Wed, 2021-04-28 at 18:41 -0400, Ayub M wrote:
> There is a table in the db, whose index_scan count from pg_stat_all_tables for this
>  table seems to be too high, there are not that many queries being executed against
>  this table. Wondering how this count can be too high.

The table contains cumulative statistics.  So you should remember the value, look
again in a day or a week and calculate the difference to see how often index scans
have been used in that time.

Yours,
Laurenz Albe
-- 
Cybertec | https://www.cybertec-postgresql.com






view thread (2+ messages)

Message-ID: <c31f7c19a5ec70f3a5af5db9b3323450d0bee913.camel@cybertec.at>
Permalink:  ../c31f7c19a5ec70f3a5af5db9b3323450d0bee913.camel@cybertec.at/
Also on:    postgresql.org/message-id/c31f7c19a5ec70f3a5af5db9b3323450d0bee913.camel@cybertec.at

 · 

reply

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: laurenz.albe@cybertec.at, hiayub@gmail.com
  Subject: Re: postgres index usage count too high
  In-Reply-To: <c31f7c19a5ec70f3a5af5db9b3323450d0bee913.camel@cybertec.at>
  References: <CAOS0qEsUg2GegBnyN5tpbnKxSxxP22d07fc_fZmgfQApgnKh_Q@mail.gmail.com> <c31f7c19a5ec70f3a5af5db9b3323450d0bee913.camel@cybertec.at>

* 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