Get hypertable stats
get_hypertable_statsGet size and compression stats for a TimescaleDB hypertable: chunk counts, row estimates, byte usage, and compression savings. Flags non-hypertables or missing TimescaleDB extension.
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.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"schema": "<schema>",
"table": "<table>"
},
"name": "get_hypertable_stats"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| table | Yes | ||
| schema | Yes | ||
| database | No | Optional: a database id from list_databases, to target a configured secondary (read-only) database; omit for the primary. Database names that are not configured ids are rejected. |
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 |