> ## Documentation Index
> Fetch the complete documentation index at: https://private-7c7dfe99-revert-104359-revert-104251-parquet-single.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/string)) — パーティション名。
* `name` ([String](/ja/reference/data-types/string)) — データパーツ名。
* `uuid` ([UUID](/ja/reference/data-types/uuid)) — パーツの UUID。
* `part_type` ([String](/ja/reference/data-types/string)) — データパーツの保存フォーマット。設定可能な値: Wide — 各カラムはファイルシステム内の別々のファイルに保存されます。Compact — すべてのカラムはファイルシステム内の1つのファイルに保存されます。
* `active` ([UInt8](/ja/reference/data-types/int-uint)) — データパーツがアクティブかどうかを示すフラグ。アクティブなデータパーツはテーブルで使用され、それ以外は削除されます。非アクティブなデータパーツはマージ後も残ります。
* `marks` ([UInt64](/ja/reference/data-types/int-uint)) — マークの数。データパーツ内のおおよその行数を取得するには、マーク数に索引粒度 (通常は8192) を掛けます (この方法は適応型粒度では機能しません) 。
* `rows` ([UInt64](/ja/reference/data-types/int-uint)) — 行数。
* `bytes_on_disk` ([UInt64](/ja/reference/data-types/int-uint)) — すべてのデータパーツファイルの合計サイズ (バイト) 。
* `data_compressed_bytes` ([UInt64](/ja/reference/data-types/int-uint)) — データパーツ内の圧縮データの合計サイズ。補助ファイル (たとえばマークファイル) は含まれません。
* `data_uncompressed_bytes` ([UInt64](/ja/reference/data-types/int-uint)) — データパーツ内の非圧縮データの合計サイズ。補助ファイル (たとえばマークファイル) は含まれません。
* `marks_bytes` ([UInt64](/ja/reference/data-types/int-uint)) — マークファイルのサイズ。
* `modification_time` ([DateTime](/ja/reference/data-types/datetime)) — データパーツを含むディレクトリの変更時刻。通常はデータパーツの作成時刻に対応します。
* `remove_time` ([DateTime](/ja/reference/data-types/datetime)) — データパーツが非アクティブになった時刻。
* `refcount` ([UInt32](/ja/reference/data-types/int-uint)) — データパーツが使用されている箇所の数。値が2より大きい場合、データパーツはクエリまたはマージで使用されています。
* `min_date` ([Date](/ja/reference/data-types/date)) — Date カラムがパーティションキーに含まれる場合の最小値。
* `max_date` ([Date](/ja/reference/data-types/date)) — Date カラムがパーティションキーに含まれる場合の最大値。
* `min_time` ([DateTime](/ja/reference/data-types/datetime)) — DateTime カラムがパーティションキーに含まれる場合の最小値。
* `max_time` ([DateTime](/ja/reference/data-types/datetime)) — DateTime カラムがパーティションキーに含まれる場合の最大値。
* `partition_id` ([String](/ja/reference/data-types/string)) — パーティションの ID。
* `min_block_number` ([Int64](/ja/reference/data-types/int-uint)) — マージ後の現在のパーツを構成するデータパーツの最小番号。
* `max_block_number` ([Int64](/ja/reference/data-types/int-uint)) — マージ後の現在のパーツを構成するデータパーツの最大番号。
* `level` ([UInt32](/ja/reference/data-types/int-uint)) — マージツリーの深さ。ゼロは、現在のパーツが他のパーツのマージではなく insert によって作成されたことを意味します。
* `data_version` ([UInt64](/ja/reference/data-types/int-uint)) — データパーツに適用するミューテーションを判定するための番号 (バージョンが data\_version より大きいミューテーション) 。
* `primary_key_bytes_in_memory` ([UInt64](/ja/reference/data-types/int-uint)) — 主キー値に使用されるメモリ量 (バイト) 。
* `primary_key_bytes_in_memory_allocated` ([UInt64](/ja/reference/data-types/int-uint)) — 主キー値用に確保されるメモリ量 (バイト) 。
* `database` ([String](/ja/reference/data-types/string)) — データベース名。
* `table` ([String](/ja/reference/data-types/string)) — テーブル名。
* `engine` ([String](/ja/reference/data-types/string)) — パラメータを除くテーブルエンジン名。
* `disk_name` ([String](/ja/reference/data-types/string)) — データパートを格納するディスク名。
* `path` ([String](/ja/reference/data-types/string)) — データパートファイルを含むフォルダの絶対パス。
* `column` ([String](/ja/reference/data-types/string)) — カラム名。
* `type` ([String](/ja/reference/data-types/string)) — カラムの型。
* `column_position` ([UInt64](/ja/reference/data-types/int-uint)) — テーブル内でのカラムの位置番号 (1 から始まります) 。
* `default_kind` ([String](/ja/reference/data-types/string)) — デフォルト値の式の種類 (DEFAULT、MATERIALIZED、ALIAS) 。定義されていない場合は空文字列です。
* `default_expression` ([String](/ja/reference/data-types/string)) — デフォルト値の式。定義されていない場合は空文字列です。
* `column_bytes_on_disk` ([UInt64](/ja/reference/data-types/int-uint)) — カラムの合計サイズ (バイト) 。
* `column_data_compressed_bytes` ([UInt64](/ja/reference/data-types/int-uint)) — カラム内の圧縮データの合計サイズ (バイト) 。
* `column_data_uncompressed_bytes` ([UInt64](/ja/reference/data-types/int-uint)) — カラム内の展開後データの合計サイズ (バイト) 。
* `column_marks_bytes` ([UInt64](/ja/reference/data-types/int-uint)) — カラムのマークのサイズ (バイト) 。
* `column_modification_time` ([Nullable(DateTime)](/ja/reference/data-types/nullable)) — カラムが最後に変更された時刻。
* `column_ttl_min` ([Nullable(DateTime)](/ja/reference/data-types/nullable)) — カラムの計算済み TTL 式の最小値。
* `column_ttl_max` ([Nullable(DateTime)](/ja/reference/data-types/nullable)) — カラムの計算済み TTL 式の最大値。
* `statistics` ([Array(String)](/ja/reference/data-types/array)) — カラムの統計情報。
* `estimates.min` ([Nullable(String)](/ja/reference/data-types/nullable)) — カラムの推定最小値。
* `estimates.max` ([Nullable(String)](/ja/reference/data-types/nullable)) — カラムの推定最大値。
* `estimates.cardinality` ([Nullable(UInt64)](/ja/reference/data-types/nullable)) — カラムの推定カーディナリティ。
* `estimates.null_count` ([Nullable(UInt64)](/ja/reference/data-types/nullable)) — カラム内の NULL 値の推定数。
* `estimates.default_count` ([Nullable(UInt64)](/ja/reference/data-types/nullable)) — カラムのストレージ上のデフォルト値と等しい行の推定数 (Nullable カラムでは NULL、非 Nullable カラムでは 0 / '' / \[] / ...) 。基本統計情報を利用できない場合は NULL。
* `serialization_kind` ([String](/ja/reference/data-types/string)) — カラムのシリアライゼーションの種類。
* `substreams` ([Array(String)](/ja/reference/data-types/array)) — カラムがシリアライズされるサブストリームの名前。
* `filenames` ([Array(String)](/ja/reference/data-types/array)) — カラムの各サブストリームに対応するファイル名
* `subcolumns.names` ([Array(String)](/ja/reference/data-types/array)) — カラムのサブカラム名
* `subcolumns.types` ([Array(String)](/ja/reference/data-types/array)) — カラムのサブカラムの型
* `subcolumns.serializations` ([Array(String)](/ja/reference/data-types/array)) — カラムのサブカラムのシリアライゼーションの種類
* `subcolumns.bytes_on_disk` ([Array(UInt64)](/ja/reference/data-types/array)) — 各サブカラムのサイズ (バイト)
* `subcolumns.data_compressed_bytes` ([Array(UInt64)](/ja/reference/data-types/array)) — 各サブカラムの圧縮データのサイズ (バイト)
* `subcolumns.data_uncompressed_bytes` ([Array(UInt64)](/ja/reference/data-types/array)) — 各サブカラムの解凍後のデータのサイズ (バイト)
* `subcolumns.marks_bytes` ([Array(UInt64)](/ja/reference/data-types/array)) — カラムの各サブカラムのマークのサイズ (バイト)

**別名:**

* `bytes` — `bytes_on_disk` の別名。
* `marks_size` — `marks_bytes` の別名。
* `part_name` — `name` の別名。

<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)
