Skip to main content
Skip to main content
Edit this page

system.parts_columns

Contains information about parts and columns of MergeTree tables. Each row describes one data part.

ColumnTypeDescription
partitionStringThe partition name. Formats: YYYYMM for automatic partitioning by month, or any_string when partitioning manually.
nameStringName of the data part.
part_typeStringThe data part storing format. Values: Wide (each column in separate file) or Compact (all columns in one file). Controlled by min_bytes_for_wide_part and min_rows_for_wide_part settings.
activeUInt8Flag indicating whether the data part is active. Active parts are used in the table; inactive parts are deleted or remain after merging.
marksUInt64The number of marks. Multiply by index granularity (usually 8192) to get approximate row count.
rowsUInt64The number of rows.
bytes_on_diskUInt64Total size of all the data part files in bytes.
data_compressed_bytesUInt64Total size of compressed data in the data part (excludes auxiliary files like marks).
data_uncompressed_bytesUInt64Total size of uncompressed data in the data part (excludes auxiliary files like marks).
marks_bytesUInt64The size of the file with marks.
modification_timeDateTimeThe time the directory with the data part was modified (usually corresponds to creation time).
remove_timeDateTimeThe time when the data part became inactive.
refcountUInt32The number of places where the data part is used. Value > 2 indicates use in queries or merges.
min_dateDateThe minimum value of the date key in the data part.
max_dateDateThe maximum value of the date key in the data part.
partition_idStringID of the partition.
min_block_numberUInt64The minimum number of data parts that make up the current part after merging.
max_block_numberUInt64The maximum number of data parts that make up the current part after merging.
levelUInt32Depth of the merge tree. Zero means created by insert, not by merging.
data_versionUInt64Number used to determine which mutations should be applied (mutations with version higher than data_version).
primary_key_bytes_in_memoryUInt64The amount of memory (in bytes) used by primary key values.
primary_key_bytes_in_memory_allocatedUInt64The amount of memory (in bytes) reserved for primary key values.
databaseStringName of the database.
tableStringName of the table.
engineStringName of the table engine without parameters.
disk_nameStringName of a disk that stores the data part.
pathStringAbsolute path to the folder with data part files.
columnStringName of the column.
typeStringColumn type.
statisticsStringStatistics created for the column.
estimates.minStringEstimated minimum value of the column.
estimates.maxStringEstimated maximum value of the column.
estimates.cardinalityStringEstimated cardinality of the column.
column_positionUInt64Ordinal position of a column in a table starting with 1.
default_kindStringExpression type (DEFAULT, MATERIALIZED, ALIAS) for the default value, or empty string if not defined.
default_expressionStringExpression for the default value, or empty string if not defined.
column_bytes_on_diskUInt64Total size of the column in bytes.
column_data_compressed_bytesUInt64Total size of compressed data in the column, in bytes. Note: this is not calculated for compact parts.
column_data_uncompressed_bytesUInt64Total size of the decompressed data in the column, in bytes. Note: this is not calculated for compact parts.
column_marks_bytesUInt64The size of the column with marks, in bytes.
bytesUInt64Alias for bytes_on_disk.
marks_sizeUInt64Alias for marks_bytes.

Example

SELECT * FROM system.parts_columns LIMIT 1 FORMAT Vertical;
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

See Also