pgsql-bloat-estimation
pgsql-bloat-estimation copied to clipboard
Queries to mesure statistical bloat in indexes and tables for PostgreSQL
Hi, I noticed when you compute the b-tree bloat, the IndexTupleData size is 2. But I couldn't understand why the size of `t_tid` + `t_info` is 2 after I read...
See discussion: https://www.postgresql.org/message-id/flat/16db4468-edfa-830a-f921-39a50498e77e%402ndquadrant.com#[email protected]
Technically speaking, this now ignores `pg_stats.null_frac` for indexed column `x` when index definition has `WHERE x IS NOT NULL`. This can fix some very skewed bloat estimates, for instance on...
Requires CTE and thus Postgres 8.4. Here is a naïve comparison : ``` console $ time psql btree_bloat-8.2-8.3.sql > old.out real 0m2,087s user 0m0,035s sys 0m0,011s $ time psql btree_bloat.sql...
As discussed today on daliconsultants: In `pg_stats`, toasted data is exactly 18 bytes when data is totally toasted. So the query computes that the bloat is higher than real. Perhaps...
Using the table bloat checker here I get this on my database (PG 14): ``` current_database | schemaname | tblname | real_size | extra_size | extra_pct | fillfactor | bloat_size...
Like the indices query (btree_bloat-superuser.sql)?