Skip to content

Instantly share code, notes, and snippets.

@Charmatzis
Created May 15, 2024 14:03
Show Gist options
  • Save Charmatzis/c7ce1b2319b8f701d5cc567baee83a08 to your computer and use it in GitHub Desktop.
Save Charmatzis/c7ce1b2319b8f701d5cc567baee83a08 to your computer and use it in GitHub Desktop.
Postgres DB bload
CREATE EXTENSION pgstattuple;
select
relname,
oid,
relowner,
(pgstattuple(oid)).dead_tuple_percent ,
(pgstattuple(oid)).*
from
pg_class
where
relkind = 'r'
order by
dead_tuple_percent desc;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment