> ## Documentation Index
> Fetch the complete documentation index at: https://private-7c7dfe99-mintlify-8c05c8a2.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

> サーバーが認識している各テーブルのメタデータを含むシステムテーブルです。

# system.tables

<div id="description">
  ## 説明
</div>

サーバーが認識している各テーブルのメタデータが含まれています。

[デタッチされた](/ja/reference/statements/detach) テーブルは `system.tables` には表示されません。

[一時テーブル](/ja/reference/statements/create/table#temporary-tables) は、作成されたセッションでのみ `system.tables` に表示されます。これらは `database` フィールドが空で、`is_temporary` フラグがオンの状態で表示されます。

<div id="columns">
  ## カラム
</div>

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

<div id="example">
  ## 例
</div>

```sql theme={null}
SELECT * FROM system.tables LIMIT 2 FORMAT Vertical;
```

```text theme={null}
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:       []
```
