Re: bloatcheck.sql

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: A System Admin <asysad(at)gmail(dot)com>, pgsql-admin(at)lists(dot)postgresql(dot)org
Subject: Re: bloatcheck.sql
Date: 2018-03-25 04:34:01
Message-ID: 1521952441.2350.4.camel@cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

A System Admin wrote:
> The author of this SQL indicates that any output for the hot_update_ratio that falls below
> 0.95 indicates that action needs to be taken over and above the autovacuuming that is setup
> for this DB based on its levels of bloat.
>
> My questions are:
>
> 1. Is this an accurate statement in your opinion for this and all PostgreSQL v9.5.9 DB's?

Nothing could be farther from the truth.

HOT update ratio has nothing to do with bloat; if anything, bloat
would *increase* the HOT ratio because there is more free space.

A low HOT update ratio could just mean that you have a lot of
indexes, because no HOT update can take place if an indexed column
is modified.

> 3. What specific ongoing/regular step(s) need to occur outside of the hourly and weekly
> commands currently being run on the DB for it to remain in an optimally performant state?

Neither regular reindexing nor VACUUM (FULL) is recommended,
although it cannot harm if you don't mind the down time.

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

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2018-03-25 17:13:31 Re: Function search_path
Previous Message David G. Johnston 2018-03-25 04:05:02 Re: bloatcheck.sql