Re: index bloat estimation

From: Victor Sudakov <vas(at)sibptus(dot)ru>
To: Keith Fiske <keith(dot)fiske(at)crunchydata(dot)com>
Cc: Pgsql-admin <pgsql-admin(at)lists(dot)postgresql(dot)org>
Subject: Re: index bloat estimation
Date: 2021-02-15 04:43:50
Message-ID: YCn8BmEe/4mA0KIb@admin.sibptus.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Keith Fiske wrote:
> >
> > What queries do you use to estimate index and table bloat?

[dd]

> Why estimate when you can get the exact amount? At least for b-tree indexes
> anyway.
>
> https://github.com/keithf4/pg_bloat_check

Hello Keith,

Thanks for this script and for reminding about pgstattuple.

The script has the drawback of requiring r/w access to the database, so
it cannot be run on a replica. But the idea is excellent. At least it
can show the top N bloated relations, and then I can further explore with
pgstattuple(), pgstatindex() etc.

--
Victor Sudakov, VAS4-RIPE, VAS47-RIPN
2:5005/49(at)fidonet http://vas.tomsk.ru/

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Yambu 2021-02-15 08:21:42 Audit preparation list
Previous Message Gregory Smith 2021-02-14 10:36:47 Re: index bloat estimation