public inbox for [email protected]  
help / color / mirror / Atom feed
From: Laurenz Albe <[email protected]>
To: Wasim Devale <[email protected]>
To: Pgsql-admin <[email protected]>
To: pgsql-admin <[email protected]>
Subject: Re: Reindexing
Date: Fri, 25 Apr 2025 07:57:23 +0200
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAB5fag6q2OyOV0uJA8nahs5WGavEw-i1fgjYODGPKYexDQToSA@mail.gmail.com>
References: <CAB5fag6q2OyOV0uJA8nahs5WGavEw-i1fgjYODGPKYexDQToSA@mail.gmail.com>

On Fri, 2025-04-25 at 10:46 +0530, Wasim Devale wrote:
> I want to automate the reindexing and planning to do it concurrently twice a week.

That's probably unnecessary.

> Can someone highlight at what percentage of index bloat can decide the frequency of reindexing?

It is perfectly normal for a B-tree index to have an "avg_leaf_density" of 30 or so,
as determined with pgstatindex().  Consider reindexing only for indexes that are
doing worse *and that keep deteriorating*.

Yours,
Laurenz Albe





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 using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: Reindexing
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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