Project: ClickHouse (App Definition and Development / Database)
File: parts_columns.md

slug: /en/operations/system-tables/parts_columns Contains information about parts and columns of tables. Each row describes one data part. Columns: `partition` () The partition name. To learn what a partition is, see the description of the query. Formats: `YYYYMM` for automatic partitioning by month. `any_string` when partitioning manually. `name` () Name of the data part. `part_type` () The data part storing format. Possible values: `Wide` Each column is stored in a separate file in a filesystem. `Compact` All columns are stored in one file in a filesystem. Data storing format is controlled by the `minbytesforwidepart` and `minrowsforwidepart` settings of the table. `active` () Flag that indicates whether the data part is active. If a data part is active, its used in a table. Otherwise, its deleted. Inactive data parts remain after merging. `marks` () The number of marks. To get the approximate number of rows in a data part, multiply `marks` by the index granularity (usually 8192) (this hint does not work for adaptive granularity). `rows` () The number of rows. `bytesondisk` () Total size of all the data part files in bytes. `datacompressedbytes` () Total size of compressed data in the data part. All the auxiliary files (for example, files with marks) are not included. `datauncompressedbytes` () Total size of uncompressed data in the data part. All the auxiliary files (for example, files with marks) are not included. `marks_bytes` () The size of the file with marks. `modification_time` () The time the directory with the data part was modified. This usually corresponds to the time of data part creation. `remove_time` () The time when the data part became inactive. `refcount` () The number of places where the data part is used. A value greater than 2 indicates that the data part is used in queries or merges. `min_date` () The minimum value of the date key in the data part. `max_date` () The maximum value of the date key in the data part. `partition_id` () ID of the

`minblocknumber` () The minimum number of data parts that make up the current part after merging. `maxblocknumber` () The maximum number of data parts that make up the current part after merging. `level` () Depth of the merge tree. Zero means that the current part was created by insert rather than by merging other parts. `dataversion` () Number that is used to determine which mutations should be applied to the data part (mutations with a version higher than `dataversion`). `primarykeybytesinmemory` () The amount of memory (in bytes) used by primary key values. `primarykeybytesinmemory_allocated` () The amount of memory (in bytes) reserved for primary key values. `database` () Name of the database. `table` () Name of the table. `engine` () Name of the table engine without parameters. `disk_name` () Name of a disk that stores the data part. `path` () Absolute path to the folder with data part files. `column` () Name of the column. `type` () Column type. `column_position` () Ordinal position of a column in a table starting with 1. `default_kind` () Expression type (`DEFAULT`, `MATERIALIZED`, `ALIAS`) for the default value, or an empty string if it is not defined. `default_expression` () Expression for the default value, or an empty string if it is not defined. `columnbyteson_disk` () Total size of the column in bytes. `columndatacompressed_bytes` () Total size of compressed data in the column, in bytes. `columndatauncompressed_bytes` () Total size of the decompressed data in the column, in bytes. `columnmarksbytes` () The size of the column with marks, in bytes. `bytes` () Alias for `bytesondisk`. `markssize` () Alias for `marksbytes`. Example ``` sql SELECT * FROM system.parts_columns LIMIT 1 FORMAT Vertical; ``` ``` text Row 1: partition: tuple() name: all12_1 part_type: Wide active: 1 marks: 2 rows: 2 bytesondisk: 155 datacompressedbytes: 56 datauncompressedbytes: 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 minblocknumber: 1 maxblocknumber: 2 level: 1 data_version: 1 primarykeybytesinmemory: 2 primarykeybytesinmemory_allocated: 64 database: default table: 53r93yleapyears engine: MergeTree disk_name: default path: /var/lib/clickhouse/data/default/53r93yleapyears/all12_1/ column: id type: Int8 column_position: 1 default_kind: default_expression: columnbyteson_disk: 76 columndatacompressed_bytes: 28 columndatauncompressed_bytes: 2 columnmarksbytes: 48 ``` See Also