v.21.6New Feature

Add 'indexes' Setting to 'EXPLAIN PIPELINE' Query for MergeTree Tables

Add setting indexes (boolean, disabled by default) to EXPLAIN PIPELINE query. When enabled, shows used indexes, number of filtered parts and granules for every index applied. Supported for MergeTree* tables. #22352 (Nikolai Kochetov).
Added the indexes setting to EXPLAIN PIPELINE queries, enabling detailed output of used indexes, filtered parts, and granules when accessing MergeTree* tables.

Why it matters

This feature helps users better understand the indexing behavior during query execution by revealing which indexes are applied and how many data parts and granules are filtered. It provides valuable insights for optimizing queries on MergeTree* tables.

How to use it

To use this feature, enable the indexes setting by adding it to your EXPLAIN PIPELINE query like this:

EXPLAIN PIPELINE SETTINGS indexes = 1
SELECT ... FROM merge_tree_table

This will output the indexes used along with the statistics on filtered parts and granules.