--- warning: DO NOT CHANGE THIS MANUALLY, THIS IS GENERATED BY https://github.com/duckdb/community-extensions repository, check README there title: table_inspector excerpt: | DuckDB Community Extensions Observability into DuckDB storage internals at the database, table, and column levels extension: name: table_inspector description: Observability into DuckDB storage internals at the database, table, and column levels version: 0.2.0 language: C++ build: cmake license: MIT excluded_platforms: "wasm_mvp;wasm_eh;wasm_threads" maintainers: - Andrewtangtang - dentiny repo: github: dentiny/duckdb-table-inspector andium: 13b830f3ccee4b4be3058a8211ad2f566c1ef698 ref: 48053bb7f6d81dd83c3123fe9c43125df6c91022 docs: hello_world: | -- List all attached persistent databases with file sizes SELECT * FROM inspect_storage(); -- List all tables with their persisted data size SELECT * FROM inspect_database(); -- Per-segment storage details for a specific column SELECT * FROM inspect_column('my_table', 'my_column'); -- High-level storage breakdown SELECT * FROM inspect_block_usage(); extended_description: | A DuckDB extension that provides observability into DuckDB storage internals. It helps users understand storage usage at the database, table, and column levels, and addresses issues like unexpected file size or poor compression. extension_star_count: 5 extension_star_count_pretty: 5 extension_download_count: 929 extension_download_count_pretty: 929 image: '/images/community_extensions/social_preview/preview_community_extension_table_inspector.png' layout: community_extension_doc --- ### Compatibility Matrix This table covers all DuckDB releases that have not reached [end-of-life](https://duckdb.org/release_calendar), including LTS releases, and shows the 2 most recent patch releases of each. Older patch releases are not listed, but the extension may be available for them as well.
| Platform | 1.4.4 | 1.4.5 | 1.5.5 | 1.5.6 | 2.0.0 | | :--- | :---: | :---: | :---: | :---: | :---: | | Linux AMD64 | ✅ | ❌ | ✅ | ✅ | ✅ | | Linux ARM64 | ✅ | ❌ | ✅ | ✅ | ✅ | | macOS AMD64 | ✅ | ❌ | ✅ | ✅ | ✅ | | macOS ARM64 | ✅ | ❌ | ✅ | ✅ | ✅ | | Windows AMD64 | ✅ | ❌ | ✅ | ✅ | ✅ | | Windows ARM64 | ❌ | ❌ | ❌ | ❌ | ❌ | | WebAssembly | ❌ | ❌ | ❌ | ❌ | ❌ | ### Installing and Loading ```sql INSTALL {{ page.extension.name }} FROM community; LOAD {{ page.extension.name }}; ``` {% if page.docs.hello_world %} ### Example ```sql {{ page.docs.hello_world }}``` {% endif %} {% if page.docs.extended_description %} ### About {{ page.extension.name }} {{ page.docs.extended_description }} {% endif %} ### Added Functions
| function_name | function_type | description | comment | examples | |---------------------|---------------|----------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------| | inspect_storage | table | List all attached persistent databases with file and WAL sizes | Returns database_name, database_file_bytes, and wal_file_bytes for each non-system, non-temporary, non-in-memory attached database | [SELECT * FROM inspect_storage();] | | inspect_database | table | List all tables with persisted data and index sizes | Calculates data size by counting unique persistent block IDs per table, and index size from ART allocator buffers | [SELECT * FROM inspect_database();] | | inspect_column | table | Show per-segment storage details for a column | Returns row_group_id, compression type, compressed_bytes, estimated_decompressed_bytes, and row_count for each segment | [SELECT * FROM inspect_column('mytable', 'mycolumn');] | | inspect_block_usage | table | Show storage breakdown by component | Breaks down a .duckdb file into table_data, index, metadata, and free_blocks with size_bytes, percentage, and block_count | [SELECT * FROM inspect_block_usage();] | | inspect_database | table | List all tables with persisted data and index sizes | Calculates data size by counting unique persistent block IDs per table, and index size from ART allocator buffers | [SELECT * FROM inspect_database();] | | inspect_column | table | Show per-segment storage details for a column | Returns row_group_id, compression type, compressed_bytes, estimated_decompressed_bytes, and row_count for each segment | [SELECT * FROM inspect_column('mytable', 'mycolumn');] | | inspect_block_usage | table | Show storage breakdown by component | Breaks down a .duckdb file into table_data, index, metadata, and free_blocks with size_bytes, percentage, and block_count | [SELECT * FROM inspect_block_usage();] | ### Overloaded Functions
This extension does not add any function overloads. ### Added Types
This extension does not add any types. ### Added Settings
| name | description | input_type | scope | aliases | typed_value | |----------------|---------------------------------------------------------|------------|--------|---------|-------------| | temp_directory | Set the directory to which temporary files are written. | VARCHAR | GLOBAL | [] | post.db.tmp |