メインコンテンツへスキップ

説明

サーバーが認識している各テーブルのメタデータが含まれています。 デタッチされた テーブルは system.tables には表示されません。 一時テーブル は、作成されたセッションでのみ system.tables に表示されます。これらは database フィールドが空で、is_temporary フラグがオンの状態で表示されます。

カラム

  • database (String) — テーブルが属するデータベース名。
  • name (String) — テーブル名。
  • uuid (UUID) — テーブルの uuid (Atomic データベース) 。
  • engine (String) — テーブルエンジン名 (パラメーターを除く) 。
  • is_temporary (UInt8) — テーブルが一時テーブルかどうかを示すフラグ。
  • data_paths (Array(String)) — ファイルシステム上のテーブルデータへのパス。
  • metadata_path (String) — ファイルシステム上のテーブルのメタデータへのパス。
  • metadata_modification_time (DateTime) — テーブルのメタデータの最終更新時刻。
  • metadata_version (Int32) — ReplicatedMergeTree テーブルのメタデータバージョン。ReplicatedMergeTree テーブル以外では 0。
  • dependencies_database (Array(String)) — 依存先のデータベース。
  • dependencies_table (Array(String)) — 依存先のテーブル (現在のテーブルに対する materialized view) 。
  • create_table_query (String) — テーブルの作成に使用されたクエリ。
  • engine_full (String) — テーブルエンジンのパラメーター。
  • as_select (String) — view の SELECT クエリ。
  • parameterized_view_parameters (Array(Tuple(name String, type String))) — パラメーター化ビューのパラメーター。
  • partition_key (String) — テーブルで指定されたパーティションキー式。
  • sorting_key (String) — テーブルで指定されたソートキー式。
  • primary_key (String) — テーブルで指定された主キー式。
  • sampling_key (String) — テーブルで指定されたサンプリングキー式。
  • unique_key (String) — テーブルで指定された一意キー式 (UNIQUE KEY clause) 。
  • storage_policy (String) — ストレージポリシー。MergeTree および Distributed エンジンを使用するテーブルに該当します。
  • total_rows (Nullable(UInt64)) — 総行数。テーブル内の正確な行数をすばやく判定できる場合はその値、それ以外は NULL (基盤となる Buffer table を含む) 。
  • total_bytes (Nullable(UInt64)) — 総バイト数。ストレージ上のテーブルの正確なバイト数をすばやく判定できる場合はその値、それ以外は NULL (基盤となるストレージは含まない) 。テーブルがデータをディスクに保存している場合は、ディスク上の使用容量 (つまり圧縮後) を返します。テーブルがデータをメモリに保存している場合は、メモリ使用量のおおよそのバイト数を返します。
  • total_bytes_uncompressed (Nullable(UInt64)) — 非圧縮の総バイト数。ストレージ上のテーブルについて、パーツのチェックサムから正確なバイト数をすばやく判定できる場合はその値、それ以外は NULL (基盤となるストレージがある場合も考慮しません) 。
  • parts (Nullable(UInt64)) — このテーブル内のパーツ総数。
  • active_parts (Nullable(UInt64)) — このテーブル内のアクティブなパーツ数。
  • total_marks (Nullable(UInt64)) — このテーブルのすべてのパーツにあるマークの総数。
  • active_on_fly_data_mutations (UInt64) — オンザフライで適用可能なアクティブなデータミューテーション (UPDATE および DELETE) の総数。
  • active_on_fly_alter_mutations (UInt64) — オンザフライで適用可能なアクティブな alter ミューテーション (MODIFY COLUMN) の総数。
  • active_on_fly_metadata_mutations (UInt64) — オンザフライで適用可能なアクティブなメタデータミューテーション (RENAME) の総数。
  • columns_descriptions_cache_size (UInt64) — *MergeTree テーブルのカラム説明 cache のサイズ。
  • lifetime_rows (Nullable(UInt64)) — サーバー起動以降に INSERT された行数の合計 (Buffer テーブルのみ) 。
  • lifetime_bytes (Nullable(UInt64)) — サーバー起動以降に INSERT されたバイト数の合計 (Buffer テーブルのみ) 。
  • comment (String) — テーブルのコメント。
  • has_own_data (UInt8) — テーブル自体がディスク上にデータを保持しているか、あるいは他のソースにアクセスするだけかを示すフラグ。
  • loading_dependencies_database (Array(String)) — データベースの読み込み依存関係 (現在のオブジェクトより前に読み込む必要があるオブジェクトの一覧) 。
  • loading_dependencies_table (Array(String)) — テーブルの読み込み依存関係 (現在のオブジェクトより前に読み込む必要があるオブジェクトの一覧) 。
  • loading_dependent_database (Array(String)) — 読み込み時にこのオブジェクトに依存するデータベース。
  • loading_dependent_table (Array(String)) — 読み込み時にこのオブジェクトに依存するテーブル。
  • target_database (String) — materialized view の場合、ビューの書き込み先である宛先テーブルのデータベース (TO ターゲット、または暗黙的な .inner.* テーブル) 。他のエンジンでは空です。
  • target_table (String) — materialized view の場合、ビューの書き込み先である宛先テーブル名 (TO ターゲット、または暗黙的な .inner.* テーブル) 。他のエンジンでは空です。
  • definer (String) — テーブルに使用される SQL security definer の名前。

SELECT * FROM system.tables LIMIT 2 FORMAT Vertical;
Row 1:
──────
database:                   base
name:                       t1
uuid:                       81b1c20a-b7c6-4116-a2ce-7583fb6b6736
engine:                     MergeTree
is_temporary:               0
data_paths:                 ['/var/lib/clickhouse/store/81b/81b1c20a-b7c6-4116-a2ce-7583fb6b6736/']
metadata_path:              /var/lib/clickhouse/store/461/461cf698-fd0b-406d-8c01-5d8fd5748a91/t1.sql
metadata_modification_time: 2021-01-25 19:14:32
dependencies_database:      []
dependencies_table:         []
create_table_query:         CREATE TABLE base.t1 (`n` UInt64) ENGINE = MergeTree ORDER BY n
engine_full:                MergeTree ORDER BY n
as_select:                  SELECT database AS table_catalog
partition_key:
sorting_key:                n
primary_key:                n
sampling_key:
storage_policy:             default
total_rows:                 1
total_bytes:                99
lifetime_rows:              ᴺᵁᴸᴸ
lifetime_bytes:             ᴺᵁᴸᴸ
comment:
has_own_data:               0
loading_dependencies_database: []
loading_dependencies_table:    []
loading_dependent_database:    []
loading_dependent_table:       []

Row 2:
──────
database:                   default
name:                       53r93yleapyears
uuid:                       00000000-0000-0000-0000-000000000000
engine:                     MergeTree
is_temporary:               0
data_paths:                 ['/var/lib/clickhouse/data/default/53r93yleapyears/']
metadata_path:              /var/lib/clickhouse/metadata/default/53r93yleapyears.sql
metadata_modification_time: 2020-09-23 09:05:36
dependencies_database:      []
dependencies_table:         []
create_table_query:         CREATE TABLE default.`53r93yleapyears` (`id` Int8, `febdays` Int8) ENGINE = MergeTree ORDER BY id
engine_full:                MergeTree ORDER BY id
as_select:                  SELECT name AS catalog_name
partition_key:
sorting_key:                id
primary_key:                id
sampling_key:
storage_policy:             default
total_rows:                 2
total_bytes:                155
lifetime_rows:              ᴺᵁᴸᴸ
lifetime_bytes:             ᴺᵁᴸᴸ
comment:
has_own_data:               0
loading_dependencies_database: []
loading_dependencies_table:    []
loading_dependent_database:    []
loading_dependent_table:       []
最終更新日 2026年6月25日