Table Statistics
kb_table_statsRetrieve storage statistics for a database table, including row count, table and index size, dead tuples, and last vacuum or analyze timestamps.
Instructions
Get storage and usage statistics for a table, including row count, size, and dead tuples.
Args:
table (string): Table name
schema (string, optional): Schema name, defaults to DB_SCHEMA env or 'public'
Returns: Table size, row count, index size, dead tuples, and last vacuum/analyze times.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| table | Yes | Table name to get statistics for | |
| schema | No | Schema name (default: from DB_SCHEMA env or 'public') |