Thread: Dead tuple ratio for table & index

Dead tuple ratio for table & index

From
kamal deen
Date:
Hi All,

Kindly share the query details  to identify the dead tuples ratio at table & index level.

We have noticed some of our partioned tables generating more WAL files during vacuumb.(around 50 to 60GB

(We are in the plan to remove this manual job later since auto vacuum is enabled) 

Thanks in advance ☺️ 

Regards,
SK

Re: Dead tuple ratio for table & index

From
lakshmi sravya
Date:
Hello SK,

you can use the pgstattuple extension, which provides exact table and
index bloat statistics.
https://www.postgresql.org/docs/current/pgstattuple.html
https://www.percona.com/blog/postgresql-tuple-level-statistics-with-pgstattuple/

Regards,
Sravya.

On Sat, Dec 14, 2024 at 3:29 AM kamal deen <kamaldeendba@gmail.com> wrote:
>
> Hi All,
>
> Kindly share the query details  to identify the dead tuples ratio at table & index level.
>
> We have noticed some of our partioned tables generating more WAL files during vacuumb.(around 50 to 60GB
>
> (We are in the plan to remove this manual job later since auto vacuum is enabled)
>
> Thanks in advance ☺️
>
> Regards,
> SK



Re: Dead tuple ratio for table & index

From
kamal deen
Date:
Thank you Sravya.

SK

On Tue, Dec 17, 2024, 3:52 PM lakshmi sravya <lakshmisravya51999@gmail.com> wrote:
Hello SK,

you can use the pgstattuple extension, which provides exact table and
index bloat statistics.
https://www.postgresql.org/docs/current/pgstattuple.html
https://www.percona.com/blog/postgresql-tuple-level-statistics-with-pgstattuple/

Regards,
Sravya.

On Sat, Dec 14, 2024 at 3:29 AM kamal deen <kamaldeendba@gmail.com> wrote:
>
> Hi All,
>
> Kindly share the query details  to identify the dead tuples ratio at table & index level.
>
> We have noticed some of our partioned tables generating more WAL files during vacuumb.(around 50 to 60GB
>
> (We are in the plan to remove this manual job later since auto vacuum is enabled)
>
> Thanks in advance ☺️
>
> Regards,
> SK