hypothetical_indexes 시스템 테이블

hypothetical_indexes 시스템 테이블

hypothetical_indexes 시스템 테이블은 현재 세션에서 정의된 모든 가상(what-if) 스킵 인덱스를 나열해요. 내용은 세션 범위로 한정돼서, 각 연결은 자신의 가상 인덱스만 볼 수 있고 현재 세션에서 인덱스가 생성되지 않았으면 테이블이 비어 있어요.

출처: 문서

본문

Description (설명)

현재 세션에서 정의된 모든 가상(what-if) 스킵 인덱스를 나열해요. CREATE HYPOTHETICAL INDEXEXPLAIN WHATIF를 참고해요. 내용은 세션 범위로 한정돼요: 각 연결은 자신의 가상 인덱스만 보고, 현재 세션에서 인덱스가 생성되지 않았으면 테이블은 비어 있어요. 현재 (database, table)는 쿼리 시점에 UUID로 결정되므로 RENAME TABLE을 반영하고, 드롭된 테이블의 항목은 자동으로 숨겨져요.

Columns (열)

  • database (String) — 데이터베이스 이름.
  • table (String) — 테이블 이름.
  • name (String) — 인덱스 이름.
  • type (String) — 인덱스 유형(minmax, set, bloom_filter 등).
  • type_full (String) — 인수 포함 인덱스 유형 표현식, 예: bloom_filter(0.01).
  • expression (String) — 인덱스 표현식.
  • granularity (UInt64) — 인덱스 granularity.

Example (예제)

CREATE HYPOTHETICAL INDEX i1 ON t (b) TYPE bloom_filter(0.01)  GRANULARITY 1;
CREATE HYPOTHETICAL INDEX i2 ON t (b) TYPE bloom_filter(0.001) GRANULARITY 1;

SELECT database, table, name, type, type_full, expression, granularity
FROM system.hypothetical_indexes;
┌─database─┬─table─┬─name─┬─type─────────┬─type_full───────────┬─expression─┬─granularity─┐
│ default  │ t     │ i1   │ bloom_filter │ bloom_filter(0.01)  │ b          │           1 │
│ default  │ t     │ i2   │ bloom_filter │ bloom_filter(0.001) │ b          │           1 │
└──────────┴───────┴──────┴──────────────┴─────────────────────┴────────────┴─────────────┘

type는 기본 유형 이름이고 type_full은 인수를 포함하므로, 사용자는 bloom_filter(0.01)bloom_filter(0.001) 같은 매개변수화된 변형을 구분할 수 있어요.

See also (참고)

더 알아보기 (Learn more)