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

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