Get hypertable stats
get_hypertable_statsSize and compression statistics for one TimescaleDB hypertable: total/compressed chunk counts, approximate row count, table/index/toast/total bytes, and bytes before/after compression.
Instructions
Size and compression statistics for one TimescaleDB hypertable: total/compressed chunk counts, approximate row count, table/index/toast/total bytes, and bytes before/after compression. Errors if the table is not a hypertable; available=false when the timescaledb extension is not installed.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| table | Yes | ||
| schema | Yes | ||
| database | No | Optional: target a configured secondary (read-only) database by name; omit for the primary. Call list_databases to see the configured ids. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| table | Yes | ||
| schema | Yes | ||
| available | Yes | ||
| index_bytes | Yes | ||
| table_bytes | Yes | ||
| toast_bytes | Yes | ||
| total_bytes | Yes | ||
| total_chunks | Yes | ||
| compressed_chunks | Yes | ||
| approximate_row_count | Yes | ||
| after_compression_bytes | Yes | ||
| before_compression_bytes | Yes |