> ## 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.

> MergeTree テーブルのパーツおよびカラムに関する情報を含むシステムテーブル。

# system.parts_columns

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

[MergeTree](/ja/reference/engines/table-engines/mergetree-family/mergetree) テーブルのパーツとカラムに関する情報を含みます。
各行は 1 つのデータパーツを表します。

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

* `partition` ([String](/ja/reference/data-types)) — パーティション名。
* `name` ([String](/ja/reference/data-types)) — データパートの名称。
* `uuid` ([UUID](/ja/reference/data-types)) — パーツの UUID。
* `part_type` ([String](/ja/reference/data-types)) — データパーツの保存形式。設定可能な値: wide パーツ — 各カラムはファイルシステム内の別々のファイルに格納されます。compact パーツ — すべてのカラムはファイルシステム内の1つのファイルに格納されます。
* `active` ([UInt8](/ja/reference/data-types)) — データパートがアクティブかどうかを示すフラグです。データパートがアクティブな場合はテーブルで使用され、そうでない場合は削除されます。アクティブでないデータパートは、マージ後も残ります。
* `marks` ([UInt64](/ja/reference/data-types)) — マークの数。データパート内のおおよその行数を求めるには、marks に index granularity (通常は 8192) を掛けます (この方法は adaptive granularity には適用できません) 。
* `rows` ([UInt64](/ja/reference/data-types)) — 行数。
* `bytes_on_disk` ([UInt64](/ja/reference/data-types)) — すべてのデータパートファイルの合計サイズ (バイト) 。
* `data_compressed_bytes` ([UInt64](/ja/reference/data-types)) — データパート内の圧縮データの合計サイズです。補助ファイル (たとえば、マークを含むファイル) は含まれません。
* `data_uncompressed_bytes` ([UInt64](/ja/reference/data-types)) — データパート内の非圧縮データの合計サイズです。補助ファイル (たとえば、マークファイル) は含まれません。
* `marks_bytes` ([UInt64](/ja/reference/data-types)) — マークファイルのサイズ。
* `modification_time` ([DateTime](/ja/reference/data-types)) — データパートが格納されたディレクトリが変更された時刻です。通常、これはデータパートの作成時刻に対応します。
* `remove_time` ([DateTime](/ja/reference/data-types)) — データパートが非アクティブになった日時。
* `refcount` ([UInt32](/ja/reference/data-types)) — データパートが使用されている箇所の数。値が 2 を超える場合、そのデータパートはクエリまたはマージで使用されています。
* `min_date` ([Date](/ja/reference/data-types)) — パーティションキーに含まれている場合の Date カラムの最小値。
* `max_date` ([Date](/ja/reference/data-types)) — パーティションキーに含まれている場合の Date カラムの最大値。
* `min_time` ([DateTime](/ja/reference/data-types)) — パーティションキーに DateTime カラムが含まれている場合の、その最小値。
* `max_time` ([DateTime](/ja/reference/data-types)) — パーティションキーに含まれている場合の、DateTimeカラムの最大値。
* `partition_id` ([String](/ja/reference/data-types)) — パーティション ID。
* `min_block_number` ([Int64](/ja/reference/data-types)) — マージ後の現在のパーツを構成するデータパーツのうち、最小の番号。
* `max_block_number` ([Int64](/ja/reference/data-types)) — マージ後の現在のパーツを構成するデータパーツの最大番号。
* `level` ([UInt32](/ja/reference/data-types)) — マージツリーの深さ。0 は、現在のパーツが他のパーツのマージではなく、insert によって作成されたことを意味します。
* `data_version` ([UInt64](/ja/reference/data-types)) — データパートにどのミューテーションを適用するかを判定するために使われる数値 (`data_version` より大きいバージョンのミューテーション) 。
* `primary_key_bytes_in_memory` ([UInt64](/ja/reference/data-types)) — 主キーの値が使用するメモリ量 (バイト単位) 。
* `primary_key_bytes_in_memory_allocated` ([UInt64](/ja/reference/data-types)) — 主キーの値のために確保されているメモリ量 (バイト単位) 。
* `database` ([String](/ja/reference/data-types)) — データベース名。
* `table` ([String](/ja/reference/data-types)) — テーブル名。
* `engine` ([String](/ja/reference/data-types)) — パラメータを含まないテーブルエンジン名。
* `disk_name` ([String](/ja/reference/data-types)) — データパートを格納するディスクの名前。
* `path` ([String](/ja/reference/data-types)) — データパートのファイルが格納されているフォルダーへの絶対パス。
* `column` ([String](/ja/reference/data-types)) — カラム名。
* `type` ([String](/ja/reference/data-types)) — カラムの型。
* `column_position` ([UInt64](/ja/reference/data-types)) — テーブル内のカラムの序数位置。1 から始まります。
* `default_kind` ([String](/ja/reference/data-types)) — デフォルト値の式の種別 (DEFAULT、MATERIALIZED、ALIAS) 。定義されていない場合は空文字列です。
* `default_expression` ([String](/ja/reference/data-types)) — デフォルト値の式。未定義の場合は空文字列です。
* `column_bytes_on_disk` ([UInt64](/ja/reference/data-types)) — カラムの総サイズ (バイト単位) 。
* `column_data_compressed_bytes` ([UInt64](/ja/reference/data-types)) — カラム内の圧縮データの合計サイズ (バイト単位) 。
* `column_data_uncompressed_bytes` ([UInt64](/ja/reference/data-types)) — カラム内の展開後データの合計サイズ (バイト) 。
* `column_marks_bytes` ([UInt64](/ja/reference/data-types)) — カラムのマークのサイズ (バイト単位) 。
* `column_modification_time` ([Nullable(DateTime)](/ja/reference/data-types)) — カラムが最後に変更された日時。
* `column_ttl_min` ([Nullable(DateTime)](/ja/reference/data-types)) — カラムに対して計算されたTTL式の最小値。
* `column_ttl_max` ([Nullable(DateTime)](/ja/reference/data-types)) — カラムの算出された有効期限 (TTL) 式の最大値。
* `statistics` ([Array(String)](/ja/reference/data-types)) — カラムの統計情報。
* `estimates.min` ([Nullable(String)](/ja/reference/data-types)) — カラムの推定最小値。
* `estimates.max` ([Nullable(String)](/ja/reference/data-types)) — カラムの推定最大値。
* `estimates.cardinality` ([Nullable(UInt64)](/ja/reference/data-types)) — カラムの推定カーディナリティ。
* `estimates.null_count` ([Nullable(UInt64)](/ja/reference/data-types)) — カラム内の NULL 値の推定数。
* `serialization_kind` ([String](/ja/reference/data-types)) — カラムのシリアライゼーションの種別
* `substreams` ([Array(String)](/ja/reference/data-types)) — カラムがシリアライズされるサブストリーム名
* `filenames` ([Array(String)](/ja/reference/data-types)) — 各カラムの各サブストリームに対応するそれぞれのファイル名
* `subcolumns.names` ([Array(String)](/ja/reference/data-types)) — カラムのサブカラム名
* `subcolumns.types` ([Array(String)](/ja/reference/data-types)) — カラムに含まれるサブカラムの型
* `subcolumns.serializations` ([Array(String)](/ja/reference/data-types)) — カラムに含まれるサブカラムのシリアライゼーションの種類
* `subcolumns.bytes_on_disk` ([Array(UInt64)](/ja/reference/data-types)) — 各サブカラムのサイズ (バイト単位)
* `subcolumns.data_compressed_bytes` ([Array(UInt64)](/ja/reference/data-types)) — 各サブカラムの圧縮データのサイズ (バイト)
* `subcolumns.data_uncompressed_bytes` ([Array(UInt64)](/ja/reference/data-types)) — 各サブカラムの展開後データのサイズ (バイト単位)
* `subcolumns.marks_bytes` ([Array(UInt64)](/ja/reference/data-types)) — カラム内の各サブカラムのマークのサイズ (バイト単位)

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

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

```text theme={null}
Row 1:
──────
partition:                             tuple()
name:                                  all_1_2_1
part_type:                             Wide
active:                                1
marks:                                 2
rows:                                  2
bytes_on_disk:                         155
data_compressed_bytes:                 56
data_uncompressed_bytes:               4
marks_bytes:                           96
modification_time:                     2020-09-23 10:13:36
remove_time:                           2106-02-07 06:28:15
refcount:                              1
min_date:                              1970-01-01
max_date:                              1970-01-01
partition_id:                          all
min_block_number:                      1
max_block_number:                      2
level:                                 1
data_version:                          1
primary_key_bytes_in_memory:           2
primary_key_bytes_in_memory_allocated: 64
database:                              default
table:                                 53r93yleapyears
engine:                                MergeTree
disk_name:                             default
path:                                  /var/lib/clickhouse/data/default/53r93yleapyears/all_1_2_1/
column:                                id
type:                                  Int8
column_position:                       1
default_kind:
default_expression:
column_bytes_on_disk:                  76
column_data_compressed_bytes:          28
column_data_uncompressed_bytes:        2
column_marks_bytes:                    48
```

<div id="see-also">
  ## 関連項目
</div>

* [MergeTree family](/ja/reference/engines/table-engines/mergetree-family/mergetree)
* [compact パーツと wide パーツの数とサイズを計算する](/ja/resources/support-center/knowledge-base/troubleshooting/count-parts-by-type)
