v.24.2New Feature

Added mergeTreeIndex Function for Introspection of MergeTree Tables

Added table function mergeTreeIndex. It represents the contents of index and marks files of MergeTree tables. It can be used for introspection. Syntax: mergeTreeIndex(database, table, [with_marks = true]) where database.table is an existing table with MergeTree engine. #58140 (Anton Popov).
Added the mergeTreeIndex table function to expose the contents of index and marks files of MergeTree tables for introspection.

Why it matters

This feature enables users to inspect the internal index and marks files of existing MergeTree 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 syntax mergeTreeIndex(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.