From: Victor Sudakov <vas@sibptus.ru>
To: Keith Fiske <keith.fiske@crunchydata.com>
Cc: Pgsql-admin <pgsql-admin@lists.postgresql.org>
Subject: Re: index bloat estimation
Date: Mon, 15 Feb 2021 11:43:50 +0700
Message-ID: <YCn8BmEe/4mA0KIb@admin.sibptus.ru> (raw)
In-Reply-To: <CAODZiv6YZj3GJsTv5_dp07VS2FACrFu_JPWsFVi64=1mJD_t0A@mail.gmail.com>
References: <YCY7oPIXobbY8oPu@admin.sibptus.ru>
<CAODZiv6YZj3GJsTv5_dp07VS2FACrFu_JPWsFVi64=1mJD_t0A@mail.gmail.com>
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@fidonet http://vas.tomsk.ru/
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: pgsql-admin@postgresql.org
Cc: vas@sibptus.ru, keith.fiske@crunchydata.com, pgsql-admin@lists.postgresql.org
Subject: Re: index bloat estimation
In-Reply-To: <YCn8BmEe/4mA0KIb@admin.sibptus.ru>
* 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