pgstattuple
show tuple-level statistics
Overview
| Package | Version | Category | License | Language |
|---|---|---|---|---|
pgstattuple | 1.5 | STAT | PostgreSQL | C |
| ID | Extension | Bin | Lib | Load | Create | Trust | Reloc | Schema |
|---|---|---|---|---|---|---|---|---|
| 6970 | pgstattuple | No | Yes | No | Yes | No | No | - |
| Related | pg_repack pg_squeeze pg_rewrite pg_dirtyread pg_column_tetris toastinfo pageinspect pagevis pg_freespacemap pg_buffercache |
|---|
Version
| PG18 | PG17 | PG16 | PG15 | PG14 |
|---|---|---|---|---|
| 1.5 | 1.5 | 1.5 | 1.5 | 1.5 |
Install
Note: This is a built-in contrib extension of PostgreSQL
Usage
pgstattuple provides functions to obtain tuple-level statistics for tables and indexes, including dead tuple counts and free space metrics.
Table Statistics
Approximate (faster) version using visibility map and FSM:
B-Tree Index Statistics
GIN Index Statistics
Hash Index Statistics
Page Count
Access
Restricted to superusers and roles with pg_stat_scan_tables privileges.
Was this page helpful?
Thanks—your feedback helps us improve this page.
What got in the way? (optional)