system.parts

    Each row describes one data part.

    Columns:

    • (String) – 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 (String) – 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 min_bytes_for_wide_part and min_rows_for_wide_part settings of the MergeTree table.

    • active () – Flag that indicates whether the data part is active. If a data part is active, it’s used in a table. Otherwise, it’s deleted. Inactive data parts remain after merging.

    • marks (UInt64) – 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 doesn’t work for adaptive granularity).

    • rows () – The number of rows.

    • bytes_on_disk (UInt64) – Total size of all the data part files in bytes.

    • data_compressed_bytes () – Total size of compressed data in the data part. All the auxiliary files (for example, files with marks) are not included.

    • data_uncompressed_bytes (UInt64) – 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 (DateTime) – The time the directory with the data part was modified. This usually corresponds to the time of data part creation.

    • 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 (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.

    • min_time (DateTime) – The minimum value of the date and time key in the data part.

    • max_time() – The maximum value of the date and time key in the data part.

    • partition_id (String) – ID of the partition.

    • min_block_number () – The minimum number of data parts that make up the current part after merging.

    • max_block_number (UInt64) – 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.

    • data_version (UInt64) – Number that is used to determine which mutations should be applied to the data part (mutations with a version higher than data_version).

    • primary_key_bytes_in_memory () – The amount of memory (in bytes) used by primary key values.

    • (UInt64) – The amount of memory (in bytes) reserved for primary key values.

    • database () – Name of the database.

    • table (String) – Name of the table.

    • engine () – Name of the table engine without parameters.

    • disk (String) – Name of a disk that stores the data part.

    • hash_of_all_files () – sipHash128 of compressed files.

    • hash_of_uncompressed_files () – sipHash128 of uncompressed files (files with marks, index file etc.).

    • uncompressed_hash_of_compressed_files () – sipHash128 of data in the compressed files as if they were uncompressed.

    • delete_ttl_info_min () — The minimum value of the date and time key for TTL DELETE rule.

    • delete_ttl_info_max () — The maximum value of the date and time key for TTL DELETE rule.

    • move_ttl_info.expression ((String)) — Array of expressions. Each expression defines a .

      Warning

      The move_ttl_info.expression array is kept mostly for backward compatibility, now the simpliest way to check TTL MOVE rule is to use the move_ttl_info.min and move_ttl_info.max fields.

    • move_ttl_info.min (Array()) — Array of date and time values. Each element describes the minimum key value for a TTL MOVE rule.

    • move_ttl_info.max ((DateTime)) — Array of date and time values. Each element describes the maximum key value for a .

    • bytes (UInt64) – Alias for bytes_on_disk.

    • marks_size () – Alias for marks_bytes.

    Example

    1. Row 1:
    2. ──────
    3. partition: tuple()
    4. name: all_1_4_1_6
    5. part_type: Wide
    6. active: 1
    7. marks: 2
    8. rows: 6
    9. data_compressed_bytes: 157
    10. data_uncompressed_bytes: 91
    11. marks_bytes: 144
    12. modification_time: 2020-06-18 13:01:49
    13. refcount: 1
    14. min_date: 1970-01-01
    15. max_date: 1970-01-01
    16. min_time: 1970-01-01 00:00:00
    17. max_time: 1970-01-01 00:00:00
    18. partition_id: all
    19. min_block_number: 1
    20. max_block_number: 4
    21. level: 1
    22. data_version: 6
    23. primary_key_bytes_in_memory: 8
    24. primary_key_bytes_in_memory_allocated: 64
    25. is_frozen: 0
    26. database: default
    27. table: months
    28. engine: MergeTree
    29. disk_name: default
    30. path: /var/lib/clickhouse/data/default/months/all_1_4_1_6/
    31. hash_of_all_files: 2d0657a16d9430824d35e327fcbd87bf
    32. hash_of_uncompressed_files: 84950cc30ba867c77a408ae21332ba29
    33. uncompressed_hash_of_compressed_files: 1ad78f1c6843bbfb99a2c931abe7df7d
    34. delete_ttl_info_min: 1970-01-01 00:00:00
    35. delete_ttl_info_max: 1970-01-01 00:00:00
    36. move_ttl_info.expression: []
    37. move_ttl_info.min: []

    See Also

    Original article