Skip to main content
Skip to main content
Edit this page

mergeTreeIndex

Represents the contents of index and marks files of MergeTree tables. It can be used for introspection

Arguments

  • database- The database name to read index and marks from.
  • table- The table name to read index and marks from.
  • with_marks - Whether include columns with marks to the result.

Returned Value

A table object with columns with values of primary index of source table, columns with values of marks (if enabled) for all possible files in data parts of source table and virtual columns:

  • part_name - The name of data part.
  • mark_number - The number of current mark in data part.
  • rows_in_granule - The number of rows in current granule.

Marks column may contain (NULL, NULL) value in case when column is absent in data part or marks for one of its substreams are not written (e.g. in compact parts).

Usage Example