跳到主要内容
跳到主要内容

system.data_skipping_indices

包含所有表中现有数据跳过索引的信息。

列:

  • database (String) — 数据库名称。
  • table (String) — 表名。
  • name (String) — 索引名。
  • type (String) — 索引类型。
  • type_full (String) — 创建语句中的索引类型表达式。
  • expr (String) — 用于索引计算的表达式。
  • creation (Enum8('Explicit' = 0, 'Implicit' = 1)) — 表示索引是否为隐式创建(通过 add_minmax_index_for_numeric_columns 或类似方式)。
  • granularity (UInt64) — 块中 granule 的数量。
  • data_compressed_bytes (UInt64) — 压缩数据的大小(字节)。
  • data_uncompressed_bytes (UInt64) — 解压缩数据的大小(字节)。
  • marks_bytes (UInt64) — 标记的大小(字节)。

示例

SELECT * FROM system.data_skipping_indices LIMIT 2 FORMAT Vertical;
Row 1:
──────
database:                default
table:                   user_actions
name:                    clicks_idx
type:                    minmax
type_full:               minmax
expr:                    clicks
creation:                Explicit
granularity:             1
data_compressed_bytes:   58
data_uncompressed_bytes: 6
marks_bytes:             48

Row 2:
──────
database:                default
table:                   users
name:                    contacts_null_idx
type:                    minmax
type_full:               minmax
expr:                    assumeNotNull(contacts_null)
creation:                Explicit
granularity:             1
data_compressed_bytes:   58
data_uncompressed_bytes: 6
marks_bytes:             48