v.24.2New Feature
Added mergeTreeIndex Function for Introspection of MergeTree Tables
Added table functionmergeTreeIndex. It represents the contents of index and marks files ofMergeTreetables. It can be used for introspection. Syntax:mergeTreeIndex(database, table, [with_marks = true])wheredatabase.tableis an existing table withMergeTreeengine. #58140 (Anton Popov).
Why it matters
This feature enables users to inspect the internal index and marks files of existingMergeTree tables, which helps in understanding data organization and optimizing queries or debugging storage-related issues.How to use it
Use the table function with the syntaxmergeTreeIndex(database, table, [with_marks = true]), where database.table is the target MergeTree table. The optional with_marks boolean flag determines whether marks files are included.