> ## Documentation Index
> Fetch the complete documentation index at: https://private-7c7dfe99-fix-nav-issues.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)) — テーブルが属するデータベース名です。
* `name` ([String](/ja/reference/data-types)) — テーブル名。
* `uuid` ([UUID](/ja/reference/data-types)) — テーブルの UUID (Atomic データベース) 。
* `engine` ([String](/ja/reference/data-types)) — テーブルエンジンの名前 (パラメータを除く) 。
* `is_temporary` ([UInt8](/ja/reference/data-types)) — テーブルが一時テーブルかどうかを示すフラグ。
* `data_paths` ([Array(String)](/ja/reference/data-types)) — ファイルシステム内にあるテーブルデータへのパス。
* `metadata_path` ([文字列](/ja/reference/data-types)) — ファイルシステム上のテーブルメタデータへのパス。
* `metadata_modification_time` ([DateTime](/ja/reference/data-types)) — テーブルのメタデータの最終更新時刻。
* `metadata_version` ([Int32](/ja/reference/data-types)) — ReplicatedMergeTree テーブルのメタデータのバージョン。ReplicatedMergeTree でないテーブルでは 0。
* `dependencies_database` ([Array(String)](/ja/reference/data-types)) — データベースの依存先。
* `dependencies_table` ([Array(String)](/ja/reference/data-types)) — テーブルの依存関係 (現在のテーブルを参照する materialized view) 。
* `create_table_query` ([String](/ja/reference/data-types)) — テーブルの作成に使用したクエリ。
* `engine_full` ([String](/ja/reference/data-types)) — テーブルエンジンのパラメータ。
* `as_select` ([String](/ja/reference/data-types)) — ビュー用の SELECT クエリ。
* `parameterized_view_parameters` ([Array(Tuple(name String, type String))](/ja/reference/data-types)) — パラメーター化ビューのパラメーター一覧。
* `partition_key` ([String](/ja/reference/data-types)) — テーブルに指定されたパーティションキーの式。
* `sorting_key` ([String](/ja/reference/data-types)) — テーブルに指定されたソートキー式。
* `primary_key` ([String](/ja/reference/data-types)) — テーブルに指定された主キー式。
* `sampling_key` ([String](/ja/reference/data-types)) — テーブルで指定されるサンプリングキー式。
* `unique_key` ([String](/ja/reference/data-types)) — テーブルに指定された一意キー式 (UNIQUE KEY 句) 。
* `storage_policy` ([String](/ja/reference/data-types)) — ストレージポリシー。MergeTree および Distributed エンジンを使用するテーブルに適用されます。
* `total_rows` ([Nullable(UInt64)](/ja/reference/data-types)) — 行数を正確かつ迅速に特定できる場合のテーブルの総行数。それ以外の場合は NULL (基になる Buffer table を含む) 。
* `total_bytes` ([Nullable(UInt64)](/ja/reference/data-types)) — ストレージ上のテーブルについて、正確なバイト数を迅速に特定できる場合はその総バイト数を、できない場合は NULL を返します (underlying storage は含みません) 。テーブルがディスクにデータを保存している場合は、ディスク上で使用されている容量 (つまり圧縮後のサイズ) を返します。テーブルがメモリにデータを保存している場合は、メモリ内で使用されているおおよそのバイト数を返します。
* `total_bytes_uncompressed` ([Nullable(UInt64)](/ja/reference/data-types)) — 非圧縮バイトの総数。ストレージ上のtableについて、パーツのチェックサムから正確なバイト数をすばやく特定できる場合はその値、そうでない場合は NULL (underlying storage がある場合でも、それは考慮されません) 。
* `parts` ([Nullable(UInt64)](/ja/reference/data-types)) — このテーブル内のパーツの合計数。
* `active_parts` ([Nullable(UInt64)](/ja/reference/data-types)) — このテーブル内の有効なパーツ数。
* `total_marks` ([Nullable(UInt64)](/ja/reference/data-types)) — このテーブル内のすべてのパーツにあるマークの総数。
* `active_on_fly_data_mutations` ([UInt64](/ja/reference/data-types)) — 即時適用に適した、実行中のデータミューテーション (UPDATE および DELETE) の総数。
* `active_on_fly_alter_mutations` ([UInt64](/ja/reference/data-types)) — オンザフライで適用可能な、進行中の alter ミューテーション (MODIFY COLUMN) の総数。
* `active_on_fly_metadata_mutations` ([UInt64](/ja/reference/data-types)) — オンザフライで適用可能な、アクティブなメタデータミューテーション (RENAME) の総数。
* `columns_descriptions_cache_size` ([UInt64](/ja/reference/data-types)) — \*MergeTreeテーブルのカラム説明キャッシュのサイズ
* `lifetime_rows` ([Nullable(UInt64)](/ja/reference/data-types)) — サーバーの起動以降に INSERT された行の総数 (Buffer テーブルのみ) 。
* `lifetime_bytes` ([Nullable(UInt64)](/ja/reference/data-types)) — サーバーの起動以降にINSERTされた総バイト数 (Bufferテーブルのみ) 。
* `comment` ([String](/ja/reference/data-types)) — テーブルに付与するコメント。
* `has_own_data` ([UInt8](/ja/reference/data-types)) — テーブル自体がディスク上にデータを保存しているか、あるいは他のログソースにアクセスするだけかを示すフラグ。
* `loading_dependencies_database` ([Array(String)](/ja/reference/data-types)) — データベースの読み込み依存関係 (現在のオブジェクトより先に読み込む必要があるオブジェクトの一覧) 。
* `loading_dependencies_table` ([Array(String)](/ja/reference/data-types)) — テーブル読み込みの依存関係 (現在のオブジェクトより先に読み込む必要があるオブジェクトの一覧) 。
* `loading_dependent_database` ([Array(String)](/ja/reference/data-types)) — 依存先として読み込まれるデータベース。
* `loading_dependent_table` ([Array(String)](/ja/reference/data-types)) — 依存先の読み込みテーブル。
* `definer` ([文字列](/ja/reference/data-types)) — テーブルに使用される 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:       []
```
