> ## 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.

> System table containing information about detached parts of MergeTree tables

# system.detached_parts

<h2 id="purpose">
  Description
</h2>

Contains information about detached parts of [MergeTree](/reference/engines/table-engines/mergetree-family/mergetree) tables. The `reason` column specifies why the part was detached.

For user-detached parts, the reason is empty. Such parts can be attached with [ALTER TABLE ATTACH PARTITION|PART](/reference/statements/alter/partition#attach-partitionpart) command.

For the description of other columns, see [system.parts](/reference/system-tables/parts).

If part name is invalid, values of some columns may be `NULL`. Such parts can be deleted with [ALTER TABLE DROP DETACHED PART](/reference/statements/alter/partition#drop-detached-partitionpart).

<h2 id="columns">
  Columns
</h2>

* `database` ([String](/reference/data-types/index)) — The name of the database this part belongs to.
* `table` ([String](/reference/data-types/index)) — The name of the table this part belongs to.
* `partition_id` ([Nullable(String)](/reference/data-types/index)) — The identifier of the partition this part belongs to.
* `name` ([String](/reference/data-types/index)) — The name of the part.
* `bytes_on_disk` ([UInt64](/reference/data-types/index)) — Total size of all the data part files in bytes.
* `modification_time` ([DateTime](/reference/data-types/index)) — The time the directory with the data part was modified. This usually corresponds to the time when detach happened.
* `disk` ([String](/reference/data-types/index)) — The name of the disk that stores this data part.
* `path` ([String](/reference/data-types/index)) — The path of the disk to the file of this data part.
* `reason` ([Nullable(String)](/reference/data-types/index)) — The explanation why this part was detached.
* `min_block_number` ([Nullable(Int64)](/reference/data-types/index)) — The minimum number of data parts that make up the current part after merging.
* `max_block_number` ([Nullable(Int64)](/reference/data-types/index)) — The maximum number of data parts that make up the current part after merging.
* `level` ([Nullable(UInt32)](/reference/data-types/index)) — Depth of the merge tree. Zero means that the current part was created by insert rather than by merging other parts.
