Merge branch 'master' of github.com:yandex/ClickHouse

This commit is contained in:
BayoNet 2019-08-21 13:53:13 +03:00
commit 3614743ecc
2 changed files with 59 additions and 33 deletions

View File

@ -249,55 +249,81 @@ This is similar to the DUAL table found in other DBMSs.
Contains information about parts of [MergeTree](table_engines/mergetree.md) tables. Contains information about parts of [MergeTree](table_engines/mergetree.md) tables.
Each row describes one part of the data. Each row describes one data part.
Columns: Columns:
- partition (String) The partition name. To learn what a partition is, see the description of the [ALTER](../query_language/alter.md#query_language_queries_alter) query. - `partition` (`String`) The partition name. To learn what a partition is, see the description of the [ALTER](../query_language/alter.md#query_language_queries_alter) query.
Formats: Formats:
- `YYYYMM` for automatic partitioning by month.
- `any_string` when partitioning manually.
- name (String) Name of the data part. - `YYYYMM` for automatic partitioning by month.
- `any_string` when partitioning manually.
- active (UInt8) Indicates whether the part is active. If a part is active, it is used in a table; otherwise, it will be deleted. Inactive data parts remain after merging. - `name` (`String`) Name of the data part.
- 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). - `active` (`UInt8`) Flag that indicates whether the part is active. If a part is active, it is used in a table; otherwise, it will be deleted. Inactive data parts remain after merging.
- marks_size (UInt64) The size of the file with marks. - `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 (UInt64) The number of rows. - `rows` (`UInt64`) The number of rows.
- bytes (UInt64) The number of bytes when compressed. - `bytes_on_disk` (`UInt64`) Total size of all the data part files in bytes.
- modification_time (DateTime) The modification time of the directory with the data part. This usually corresponds to the time of data part creation.| - `data_compressed_bytes` (`UInt64`) Total size of compressed data in the data part. All the auxiliary files (for example, files with marks) are not included.
- remove_time (DateTime) The time when the data part became inactive. - `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.
- refcount (UInt32) 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. - `marks_bytes` (`UInt64`) The size of the file with marks.
- min_date (Date) The minimum value of the date key in the data part. - `modification_time` (`DateTime`) The modification time of the directory with the data part. This usually corresponds to the time of data part creation.|
- max_date (Date) The maximum value of the date key in the data part. - `remove_time` (`DateTime`) The time when the data part became inactive.
- min_block_number (UInt64) The minimum number of data parts that make up the current part after merging. - `refcount` (`UInt32`) 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.
- max_block_number (UInt64) The maximum number of data parts that make up the current part after merging. - `min_date` (`Date`) The minimum value of the date key in the data part.
- level (UInt32) Depth of the merge tree. If a merge was not performed, ``level=0``. - `max_date` (`Date`) The maximum value of the date key in the data part.
- primary_key_bytes_in_memory (UInt64) The amount of memory (in bytes) used by primary key values. - `min_time` (`DateTime`) The minimum value of the date and time key in the data part.
- primary_key_bytes_in_memory_allocated (UInt64) The amount of memory (in bytes) reserved for primary key values. - `max_time`(`DateTime`) The maximum value of the date and time key in the data part.
- database (String) Name of the database. - `partition_id` (`String`) Id of the partition.
- table (String) Name of the table. - `min_block_number` (`UInt64`) The minimum number of data parts that make up the current part after merging.
- engine (String) Name of the table engine without parameters. - `max_block_number` (`UInt64`) The maximum number of data parts that make up the current part after merging.
- `level` (`UInt32`) Depth of the merge tree. Zero means that 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 (the mutations with the higher version than `data_version`).
- `primary_key_bytes_in_memory` (`UInt64`) The amount of memory (in bytes) used by primary key values.
- `primary_key_bytes_in_memory_allocated` (`UInt64`) The amount of memory (in bytes) reserved for primary key values.
- `is_frozen` (`UInt8`) Flag that shows partition data backup existence. 1, the backup exists. 0, the backup doesn't exist. For more details, see [FREEZE PARTITION](../query_language/alter.md#alter_freeze-partition)
- `database` (`String`) Name of the database.
- `table` (`String`) Name of the table.
- `engine` (`String`) Name of the table engine without parameters.
- `path` (`String`) Absolute path to the folder with data part files.
- `hash_of_all_files` (`String`) [sipHash128](../query_language/functions/hash_functions.md#hash_functions-siphash128) of compressed files.
- `hash_of_uncompressed_files` (`String`) [sipHash128](../query_language/functions/hash_functions.md#hash_functions-siphash128) of uncompressed data.
- `uncompressed_hash_of_compressed_files` (`String`) [sipHash128](../query_language/functions/hash_functions.md#hash_functions-siphash128) of the file with marks.
- `bytes` (`UInt64`) Alias for `bytes_on_disk`.
- `marks_size` (`UInt64`) Alias for `marks_bytes`.
- is_frozen (UInt8) Flag that shows partition data backup existence. 1, the backup exists. 0, the backup doesn't exist. For more details, see [FREEZE PARTITION](../query_language/alter.md#alter_freeze-partition)
## system.part_log {#system_tables-part-log} ## system.part_log {#system_tables-part-log}
@ -376,8 +402,8 @@ Columns:
- 4 — Exception during the query execution. - 4 — Exception during the query execution.
- `event_date` (Date) — Event date. - `event_date` (Date) — Event date.
- `event_time` (DateTime) — Event time. - `event_time` (DateTime) — Event time.
- `query_start_time` (DateTime) — Start time of query processing. - `query_start_time` (DateTime) — Start time of query execution.
- `query_duration_ms` (UInt64) — Duration of query processing. - `query_duration_ms` (UInt64) — Duration of query execution.
- `read_rows` (UInt64) — Number of read rows. - `read_rows` (UInt64) — Number of read rows.
- `read_bytes` (UInt64) — Number of read bytes. - `read_bytes` (UInt64) — Number of read bytes.
- `written_rows` (UInt64) — For `INSERT` queries, the number of written rows. For other queries, the column value is 0. - `written_rows` (UInt64) — For `INSERT` queries, the number of written rows. For other queries, the column value is 0.

View File

@ -74,7 +74,7 @@ SELECT sipHash64(array('e','x','a'), 'mple', 10, toDateTime('2019-06-15 23:00:00
└──────────────────────┴────────┘ └──────────────────────┴────────┘
``` ```
## sipHash128 ## sipHash128 {#hash_functions-siphash128}
Calculates SipHash from a string. Calculates SipHash from a string.
Accepts a String-type argument. Returns FixedString(16). Accepts a String-type argument. Returns FixedString(16).