Merge branch 'master' into ast-table-identifier-2

This commit is contained in:
Ivan 2020-10-26 18:54:18 +03:00 committed by GitHub
commit 15e3254a85
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
334 changed files with 2177 additions and 967 deletions

View File

@ -82,6 +82,7 @@ RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
ENV COMMIT_SHA=''
ENV PULL_REQUEST_NUMBER=''
ENV COPY_CLICKHOUSE_BINARY_TO_OUTPUT=0
COPY run.sh /
CMD ["/bin/bash", "/run.sh"]

View File

@ -172,6 +172,9 @@ function build
(
cd "$FASTTEST_BUILD"
time ninja clickhouse-bundle | ts '%Y-%m-%d %H:%M:%S' | tee "$FASTTEST_OUTPUT/build_log.txt"
if [ "$COPY_CLICKHOUSE_BINARY_TO_OUTPUT" -eq "1" ]; then
cp programs/clickhouse "$FASTTEST_OUTPUT/clickhouse"
fi
ccache --show-stats ||:
)
}

View File

@ -17,14 +17,24 @@ service clickhouse-server start && sleep 5
if grep -q -- "--use-skip-list" /usr/bin/clickhouse-test; then
SKIP_LIST_OPT="--use-skip-list"
fi
# We can have several additional options so we path them as array because it's
# more idiologically correct.
read -ra ADDITIONAL_OPTIONS <<< "${ADDITIONAL_OPTIONS:-}"
function run_tests()
{
# We can have several additional options so we path them as array because it's
# more idiologically correct.
read -ra ADDITIONAL_OPTIONS <<< "${ADDITIONAL_OPTIONS:-}"
# Skip these tests, because they fail when we rerun them multiple times
if [ "$NUM_TRIES" -gt "1" ]; then
ADDITIONAL_OPTIONS+=('--skip')
ADDITIONAL_OPTIONS+=('00000_no_tests_to_skip')
fi
for i in $(seq 1 $NUM_TRIES); do
clickhouse-test --testname --shard --zookeeper --hung-check --print-time "$SKIP_LIST_OPT" "${ADDITIONAL_OPTIONS[@]}" "$SKIP_TESTS_OPTION" 2>&1 | ts '%Y-%m-%d %H:%M:%S' | tee -a test_output/test_result.txt
clickhouse-test --testname --shard --zookeeper --hung-check --print-time "$SKIP_LIST_OPT" "${ADDITIONAL_OPTIONS[@]}" 2>&1 | ts '%Y-%m-%d %H:%M:%S' | tee -a test_output/test_result.txt
if [ ${PIPESTATUS[0]} -ne "0" ]; then
break;
fi
done
}

View File

@ -18,4 +18,14 @@ toc_title: Cloud
- Encryption and isolation
- Automated maintenance
## Altinity.Cloud {#altinity.cloud}
[Altinity.Cloud](https://altinity.com/cloud-database/) is a fully managed ClickHouse-as-a-Service for the Amazon public cloud.
- Fast deployment of ClickHouse clusters on Amazon resources
- Easy scale-out/scale-in as well as vertical scaling of nodes
- Isolated per-tenant VPCs with public endpoint or VPC peering
- Configurable storage types and volume configurations
- Cross-AZ scaling for performance and high availability
- Built-in monitoring and SQL query editor
{## [Original article](https://clickhouse.tech/docs/en/commercial/cloud/) ##}

View File

@ -30,4 +30,4 @@ Instead of inserting data manually, you might consider to use one of [client lib
- `input_format_import_nested_json` allows to insert nested JSON objects into columns of [Nested](../../sql-reference/data-types/nested-data-structures/nested.md) type.
!!! note "Note"
Settings are specified as `GET` parameters for the HTTP interface or as additional command-line arguments prefixed with `--` for the CLI interface.
Settings are specified as `GET` parameters for the HTTP interface or as additional command-line arguments prefixed with `--` for the `CLI` interface.

View File

@ -1,5 +1,5 @@
---
toc_priority: 17
toc_priority: 19
toc_title: AMPLab Big Data Benchmark
---

View File

@ -1,5 +1,5 @@
---
toc_priority: 19
toc_priority: 18
toc_title: Terabyte Click Logs from Criteo
---

View File

@ -1,6 +1,6 @@
---
toc_folder_title: Example Datasets
toc_priority: 15
toc_priority: 14
toc_title: Introduction
---

View File

@ -1,5 +1,5 @@
---
toc_priority: 14
toc_priority: 15
toc_title: Yandex.Metrica Data
---

View File

@ -1,5 +1,5 @@
---
toc_priority: 16
toc_priority: 20
toc_title: New York Taxi Data
---

View File

@ -1,5 +1,5 @@
---
toc_priority: 15
toc_priority: 21
toc_title: OnTime
---

View File

@ -1,5 +1,5 @@
---
toc_priority: 20
toc_priority: 16
toc_title: Star Schema Benchmark
---

View File

@ -1,5 +1,5 @@
---
toc_priority: 18
toc_priority: 17
toc_title: WikiStat
---

View File

@ -460,7 +460,7 @@ See also the [JSONEachRow](#jsoneachrow) format.
## JSONString {#jsonstring}
Differs from JSON only in that data fields are output in strings, not in typed json values.
Differs from JSON only in that data fields are output in strings, not in typed JSON values.
Example:
@ -596,7 +596,7 @@ When inserting the data, you should provide a separate JSON value for each row.
## JSONEachRowWithProgress {#jsoneachrowwithprogress}
## JSONStringEachRowWithProgress {#jsonstringeachrowwithprogress}
Differs from JSONEachRow/JSONStringEachRow in that ClickHouse will also yield progress information as JSON objects.
Differs from `JSONEachRow`/`JSONStringEachRow` in that ClickHouse will also yield progress information as JSON values.
```json
{"row":{"'hello'":"hello","multiply(42, number)":"0","range(5)":[0,1,2,3,4]}}
@ -608,7 +608,7 @@ Differs from JSONEachRow/JSONStringEachRow in that ClickHouse will also yield pr
## JSONCompactEachRowWithNamesAndTypes {#jsoncompacteachrowwithnamesandtypes}
## JSONCompactStringEachRowWithNamesAndTypes {#jsoncompactstringeachrowwithnamesandtypes}
Differs from JSONCompactEachRow/JSONCompactStringEachRow in that the column names and types are written as the first two rows.
Differs from `JSONCompactEachRow`/`JSONCompactStringEachRow` in that the column names and types are written as the first two rows.
```json
["'hello'", "multiply(42, number)", "range(5)"]

View File

@ -6,7 +6,7 @@ toc_title: Client Libraries
# Client Libraries from Third-party Developers {#client-libraries-from-third-party-developers}
!!! warning "Disclaimer"
Yandex does **not** maintain the libraries listed below and havent done any extensive testing to ensure their quality.
Yandex does **not** maintain the libraries listed below and hasnt done any extensive testing to ensure their quality.
- Python
- [infi.clickhouse_orm](https://github.com/Infinidat/infi.clickhouse_orm)

View File

@ -0,0 +1,48 @@
# system.crash_log {#system-tables_crash_log}
Contains information about stack traces for fatal errors. The table does not exist in the database by default, it is created only when fatal errors occur.
Columns:
- `event_date` ([Datetime](../../sql-reference/data-types/datetime.md)) — Date of the event.
- `event_time` ([Datetime](../../sql-reference/data-types/datetime.md)) — Time of the event.
- `timestamp_ns` ([UInt64](../../sql-reference/data-types/int-uint.md)) — Timestamp of the event with nanoseconds.
- `signal` ([Int32](../../sql-reference/data-types/int-uint.md)) — Signal number.
- `thread_id` ([UInt64](../../sql-reference/data-types/int-uint.md)) — Thread ID.
- `query_id` ([String](../../sql-reference/data-types/string.md)) — Query ID.
- `trace` ([Array](../../sql-reference/data-types/array.md)([UInt64](../../sql-reference/data-types/int-uint.md))) — Stack trace at the moment of crash. Each element is a virtual memory address inside ClickHouse server process.
- `trace_full` ([Array](../../sql-reference/data-types/array.md)([String](../../sql-reference/data-types/string.md))) — Stack trace at the moment of crash. Each element contains a called method inside ClickHouse server process.
- `version` ([String](../../sql-reference/data-types/string.md)) — ClickHouse server version.
- `revision` ([UInt32](../../sql-reference/data-types/int-uint.md)) — ClickHouse server revision.
- `build_id` ([String](../../sql-reference/data-types/string.md)) — BuildID that is generated by compiler.
**Example**
Query:
``` sql
SELECT * FROM system.crash_log ORDER BY event_time DESC LIMIT 1;
```
Result (not full):
``` text
Row 1:
──────
event_date: 2020-10-14
event_time: 2020-10-14 15:47:40
timestamp_ns: 1602679660271312710
signal: 11
thread_id: 23624
query_id: 428aab7c-8f5c-44e9-9607-d16b44467e69
trace: [188531193,...]
trace_full: ['3. DB::(anonymous namespace)::FunctionFormatReadableTimeDelta::executeImpl(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> >&, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> > const&, unsigned long, unsigned long) const @ 0xb3cc1f9 in /home/username/work/ClickHouse/build/programs/clickhouse',...]
version: ClickHouse 20.11.1.1
revision: 54442
build_id:
```
**See also**
- [trace_log](../../operations/system-tables/trace_log.md) system table
[Original article](https://clickhouse.tech/docs/en/operations/system-tables/crash-log)

View File

@ -20,8 +20,8 @@ The `system.query_log` table registers two kinds of queries:
Each query creates one or two rows in the `query_log` table, depending on the status (see the `type` column) of the query:
1. If the query execution was successful, two rows with the `QueryStart` and `QueryFinish` types are created .
2. If an error occurred during query processing, two events with the `QueryStart` and `ExceptionWhileProcessing` types are created .
1. If the query execution was successful, two rows with the `QueryStart` and `QueryFinish` types are created.
2. If an error occurred during query processing, two events with the `QueryStart` and `ExceptionWhileProcessing` types are created.
3. If an error occurred before launching the query, a single event with the `ExceptionBeforeStart` type is created.
Columns:
@ -37,8 +37,8 @@ Columns:
- `query_start_time` ([DateTime](../../sql-reference/data-types/datetime.md)) — Start time of query execution.
- `query_start_time_microseconds` ([DateTime64](../../sql-reference/data-types/datetime64.md)) — Start time of query execution with microsecond precision.
- `query_duration_ms` ([UInt64](../../sql-reference/data-types/int-uint.md#uint-ranges)) — Duration of query execution in milliseconds.
- `read_rows` ([UInt64](../../sql-reference/data-types/int-uint.md#uint-ranges)) — Total number or rows read from all tables and table functions participated in query. It includes usual subqueries, subqueries for `IN` and `JOIN`. For distributed queries `read_rows` includes the total number of rows read at all replicas. Each replica sends its `read_rows` value, and the server-initiator of the query summarize all received and local values. The cache volumes doesnt affect this value.
- `read_bytes` ([UInt64](../../sql-reference/data-types/int-uint.md#uint-ranges)) — Total number or bytes read from all tables and table functions participated in query. It includes usual subqueries, subqueries for `IN` and `JOIN`. For distributed queries `read_bytes` includes the total number of rows read at all replicas. Each replica sends its `read_bytes` value, and the server-initiator of the query summarize all received and local values. The cache volumes doesnt affect this value.
- `read_rows` ([UInt64](../../sql-reference/data-types/int-uint.md#uint-ranges)) — Total number of rows read from all tables and table functions participated in query. It includes usual subqueries, subqueries for `IN` and `JOIN`. For distributed queries `read_rows` includes the total number of rows read at all replicas. Each replica sends its `read_rows` value, and the server-initiator of the query summarizes all received and local values. The cache volumes dont affect this value.
- `read_bytes` ([UInt64](../../sql-reference/data-types/int-uint.md#uint-ranges)) — Total number of bytes read from all tables and table functions participated in query. It includes usual subqueries, subqueries for `IN` and `JOIN`. For distributed queries `read_bytes` includes the total number of rows read at all replicas. Each replica sends its `read_bytes` value, and the server-initiator of the query summarizes all received and local values. The cache volumes dont affect this value.
- `written_rows` ([UInt64](../../sql-reference/data-types/int-uint.md#uint-ranges)) — For `INSERT` queries, the number of written rows. For other queries, the column value is 0.
- `written_bytes` ([UInt64](../../sql-reference/data-types/int-uint.md#uint-ranges)) — For `INSERT` queries, the number of written bytes. For other queries, the column value is 0.
- `result_rows` ([UInt64](../../sql-reference/data-types/int-uint.md#uint-ranges)) — Number of rows in a result of the `SELECT` query, or a number of rows in the `INSERT` query.

View File

@ -1,6 +1,6 @@
# system.query_thread_log {#system_tables-query_thread_log}
Contains information about threads which execute queries, for example, thread name, thread start time, duration of query processing.
Contains information about threads that execute queries, for example, thread name, thread start time, duration of query processing.
To start logging:

View File

@ -1,6 +1,6 @@
# system.text_log {#system_tables-text_log}
Contains logging entries. Logging level which goes to this table can be limited with `text_log.level` server setting.
Contains logging entries. The logging level which goes to this table can be limited to the `text_log.level` server setting.
Columns:

View File

@ -18,7 +18,7 @@ Columns:
- `revision` ([UInt32](../../sql-reference/data-types/int-uint.md)) — ClickHouse server build revision.
When connecting to server by `clickhouse-client`, you see the string similar to `Connected to ClickHouse server version 19.18.1 revision 54429.`. This field contains the `revision`, but not the `version` of a server.
When connecting to the server by `clickhouse-client`, you see the string similar to `Connected to ClickHouse server version 19.18.1 revision 54429.`. This field contains the `revision`, but not the `version` of a server.
- `timer_type` ([Enum8](../../sql-reference/data-types/enum.md)) — Timer type:

View File

@ -61,6 +61,54 @@ SELECT toUUID('61f0c404-5cb3-11e7-907b-a6006ad3dba0') AS uuid
└──────────────────────────────────────┘
```
## toUUIDOrNull (x) {#touuidornull-x}
It takes an argument of type String and tries to parse it into UUID. If failed, returns NULL.
``` sql
toUUIDOrNull(String)
```
**Returned value**
The Nullable(UUID) type value.
**Usage example**
``` sql
SELECT toUUIDOrNull('61f0c404-5cb3-11e7-907b-a6006ad3dba0T') AS uuid
```
``` text
┌─uuid─┐
│ ᴺᵁᴸᴸ │
└──────┘
```
## toUUIDOrZero (x) {#touuidorzero-x}
It takes an argument of type String and tries to parse it into UUID. If failed, returns zero UUID.
``` sql
toUUIDOrZero(String)
```
**Returned value**
The UUID type value.
**Usage example**
``` sql
SELECT toUUIDOrZero('61f0c404-5cb3-11e7-907b-a6006ad3dba0T') AS uuid
```
``` text
┌─────────────────────────────────uuid─┐
│ 00000000-0000-0000-0000-000000000000 │
└──────────────────────────────────────┘
```
## UUIDStringToNum {#uuidstringtonum}
Accepts a string containing 36 characters in the format `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`, and returns it as a set of bytes in a [FixedString(16)](../../sql-reference/data-types/fixedstring.md).

View File

@ -1,5 +1,5 @@
---
toc_priority: 37
toc_priority: 38
toc_title: Operators
---

View File

@ -1,5 +1,5 @@
---
toc_priority: 36
toc_priority: 35
toc_title: ALTER
---

View File

@ -5,16 +5,16 @@ toc_title: SAMPLE BY
# Manipulating Sampling-Key Expressions {#manipulations-with-sampling-key-expressions}
Syntax:
``` sql
ALTER TABLE [db].name [ON CLUSTER cluster] MODIFY SAMPLE BY new_expression
```
The command changes the [sampling key](../../../engines/table-engines/mergetree-family/mergetree.md) of the table to `new_expression` (an expression or a tuple of expressions).
The command is lightweight in a sense that it only changes metadata. The primary key must contain the new sample key.
The command is lightweight in the sense that it only changes metadata. The primary key must contain the new sample key.
!!! note "Note"
It only works for tables in the [`MergeTree`](../../../engines/table-engines/mergetree-family/mergetree.md) family (including
It only works for tables in the [MergeTree](../../../engines/table-engines/mergetree-family/mergetree.md) family (including
[replicated](../../../engines/table-engines/mergetree-family/replication.md) tables).

View File

@ -1,5 +1,5 @@
---
toc_priority: 42
toc_priority: 40
toc_title: ATTACH
---

View File

@ -1,5 +1,5 @@
---
toc_priority: 43
toc_priority: 41
toc_title: CHECK
---

View File

@ -1,5 +1,5 @@
---
toc_priority: 1
toc_priority: 35
toc_title: DATABASE
---

View File

@ -1,5 +1,5 @@
---
toc_priority: 4
toc_priority: 38
toc_title: DICTIONARY
---

View File

@ -1,6 +1,6 @@
---
toc_folder_title: CREATE
toc_priority: 35
toc_priority: 34
toc_title: Overview
---

View File

@ -1,5 +1,5 @@
---
toc_priority: 8
toc_priority: 42
toc_title: QUOTA
---

View File

@ -1,5 +1,5 @@
---
toc_priority: 6
toc_priority: 40
toc_title: ROLE
---

View File

@ -1,5 +1,5 @@
---
toc_priority: 7
toc_priority: 41
toc_title: ROW POLICY
---

View File

@ -1,5 +1,5 @@
---
toc_priority: 9
toc_priority: 43
toc_title: SETTINGS PROFILE
---

View File

@ -1,5 +1,5 @@
---
toc_priority: 2
toc_priority: 36
toc_title: TABLE
---

View File

@ -1,5 +1,5 @@
---
toc_priority: 5
toc_priority: 39
toc_title: USER
---

View File

@ -1,5 +1,5 @@
---
toc_priority: 3
toc_priority: 37
toc_title: VIEW
---

View File

@ -1,5 +1,5 @@
---
toc_priority: 44
toc_priority: 42
toc_title: DESCRIBE
---

View File

@ -1,5 +1,5 @@
---
toc_priority: 45
toc_priority: 43
toc_title: DETACH
---

View File

@ -1,88 +1,100 @@
---
toc_priority: 46
toc_priority: 44
toc_title: DROP
---
# DROP Statements {#drop}
Deletes existing entity. If `IF EXISTS` clause is specified, these queries doesnt return an error if the entity doesnt exist.
Deletes existing entity. If the `IF EXISTS` clause is specified, these queries dont return an error if the entity doesnt exist.
## DROP DATABASE {#drop-database}
Deletes all tables inside the `db` database, then deletes the `db` database itself.
Syntax:
``` sql
DROP DATABASE [IF EXISTS] db [ON CLUSTER cluster]
```
Deletes all tables inside the `db` database, then deletes the db database itself.
## DROP TABLE {#drop-table}
Deletes the table.
Syntax:
``` sql
DROP [TEMPORARY] TABLE [IF EXISTS] [db.]name [ON CLUSTER cluster]
```
Deletes the table.
## DROP DICTIONARY {#drop-dictionary}
Deletes the dictionary.
Syntax:
``` sql
DROP DICTIONARY [IF EXISTS] [db.]name
```
Deletes the dictionary.
## DROP USER {#drop-user-statement}
Deletes a user.
Syntax:
``` sql
DROP USER [IF EXISTS] name [,...] [ON CLUSTER cluster_name]
```
Deletes a user.
## DROP ROLE {#drop-role-statement}
Deletes a role. The deleted role is revoked from all the entities where it was assigned.
Syntax:
``` sql
DROP ROLE [IF EXISTS] name [,...] [ON CLUSTER cluster_name]
```
Deletes a role.
Deleted role is revoked from all the entities where it was assigned.
## DROP ROW POLICY {#drop-row-policy-statement}
Deletes a row policy. Deleted row policy is revoked from all the entities where it was assigned.
Syntax:
``` sql
DROP [ROW] POLICY [IF EXISTS] name [,...] ON [database.]table [,...] [ON CLUSTER cluster_name]
```
Deletes a row policy.
Deleted row policy is revoked from all the entities where it was assigned.
## DROP QUOTA {#drop-quota-statement}
Deletes a quota. The deleted quota is revoked from all the entities where it was assigned.
Syntax:
``` sql
DROP QUOTA [IF EXISTS] name [,...] [ON CLUSTER cluster_name]
```
Deletes a quota.
Deleted quota is revoked from all the entities where it was assigned.
## DROP SETTINGS PROFILE {#drop-settings-profile-statement}
Deletes a settings profile. The deleted settings profile is revoked from all the entities where it was assigned.
Syntax:
``` sql
DROP [SETTINGS] PROFILE [IF EXISTS] name [,...] [ON CLUSTER cluster_name]
```
Deletes a settings profile.
Deleted settings profile is revoked from all the entities where it was assigned.
## DROP VIEW {#drop-view}
Deletes a view. Views can be deleted by a `DROP TABLE` command as well but `DROP VIEW` checks that `[db.]name` is a view.
Syntax:
``` sql
DROP VIEW [IF EXISTS] [db.]name [ON CLUSTER cluster]
```
Deletes a view. Views can be deleted by a `DROP TABLE` command as well but `DROP VIEW` checks that `[db.]name` is a view.
[Оriginal article](https://clickhouse.tech/docs/en/sql-reference/statements/drop/) <!--hide-->

View File

@ -1,5 +1,5 @@
---
toc_priority: 47
toc_priority: 45
toc_title: EXISTS
---

View File

@ -1,5 +1,5 @@
---
toc_priority: 39
toc_priority: 38
toc_title: GRANT
---

View File

@ -1,5 +1,5 @@
---
toc_priority: 34
toc_priority: 33
toc_title: INSERT INTO
---

View File

@ -1,5 +1,5 @@
---
toc_priority: 48
toc_priority: 46
toc_title: KILL
---

View File

@ -1,5 +1,5 @@
---
toc_priority: 49
toc_priority: 47
toc_title: OPTIMIZE
---

View File

@ -1,5 +1,5 @@
---
toc_priority: 50
toc_priority: 48
toc_title: RENAME
---

View File

@ -1,5 +1,5 @@
---
toc_priority: 40
toc_priority: 39
toc_title: REVOKE
---

View File

@ -1,7 +1,7 @@
---
title: SELECT Query
toc_folder_title: SELECT
toc_priority: 33
toc_priority: 32
toc_title: Overview
---

View File

@ -1,5 +1,5 @@
---
toc_priority: 52
toc_priority: 51
toc_title: SET ROLE
---

View File

@ -1,5 +1,5 @@
---
toc_priority: 51
toc_priority: 49
toc_title: SET
---

View File

@ -1,5 +1,5 @@
---
toc_priority: 38
toc_priority: 37
toc_title: SHOW
---

View File

@ -1,5 +1,5 @@
---
toc_priority: 37
toc_priority: 36
toc_title: SYSTEM
---

View File

@ -1,5 +1,5 @@
---
toc_priority: 53
toc_priority: 52
toc_title: TRUNCATE
---

View File

@ -1,5 +1,5 @@
---
toc_priority: 54
toc_priority: 53
toc_title: USE
---

View File

@ -1,3 +1,8 @@
---
toc_priority: 1
toc_title: "\u041f\u043e\u0441\u0442\u0430\u0432\u0449\u0438\u043a\u0438\u0020\u043e\u0431\u043b\u0430\u0447\u043d\u044b\u0445\u0020\u0443\u0441\u043b\u0443\u0433\u0020\u0043\u006c\u0069\u0063\u006b\u0048\u006f\u0075\u0073\u0065"
---
# Поставщики облачных услуг ClickHouse {#clickhouse-cloud-service-providers}
!!! info "Инфо"

View File

@ -1,3 +1,8 @@
---
toc_priority: 62
toc_title: "\u041e\u0431\u0437\u043e\u0440\u0020\u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b\u0020\u0043\u006c\u0069\u0063\u006b\u0048\u006f\u0075\u0073\u0065"
---
# Обзор архитектуры ClickHouse {#overview-of-clickhouse-architecture}
ClickHouse - полноценная колоночная СУБД. Данные хранятся в колонках, а в процессе обработки - в массивах (векторах или фрагментах (chunkах) колонок). По возможности операции выполняются на массивах, а не на индивидуальных значениях. Это называется “векторизованное выполнения запросов” (vectorized query execution), и помогает снизить стоимость фактической обработки данных.

View File

@ -1,3 +1,9 @@
---
toc_priority: 71
toc_title: "\u041d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u044f\u0020\u043f\u043e\u0020\u043a\u043e\u0434\u0443\u0020\u0043\u006c\u0069\u0063\u006b\u0048\u006f\u0075\u0073\u0065"
---
# Навигация по коду ClickHouse {#navigatsiia-po-kodu-clickhouse}
Для навигации по коду онлайн доступен **Woboq**, он расположен [здесь](https://clickhouse.tech/codebrowser/html_report///ClickHouse/src/index.html). В нём реализовано удобное перемещение между исходными файлами, семантическая подсветка, подсказки, индексация и поиск. Слепок кода обновляется ежедневно.

View File

@ -1,3 +1,9 @@
---
toc_priority: 70
toc_title: "\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435\u0020\u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0435\u0020\u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438"
---
# Используемые сторонние библиотеки {#ispolzuemye-storonnie-biblioteki}
| Библиотека | Лицензия |

View File

@ -1,3 +1,8 @@
---
toc_priority: 61
toc_title: "\u0418\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f\u0020\u0434\u043b\u044f\u0020\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432"
---
# Инструкция для разработчиков
Сборка ClickHouse поддерживается на Linux, FreeBSD, Mac OS X.

View File

@ -1,3 +1,9 @@
---
toc_priority: 68
toc_title: "\u041a\u0430\u043a\u0020\u043f\u0438\u0441\u0430\u0442\u044c\u0020\u043a\u043e\u0434\u0020\u043d\u0430\u0020\u0043\u002b\u002b"
---
# Как писать код на C++ {#kak-pisat-kod-na-c}
## Общее {#obshchee}

View File

@ -1,3 +1,10 @@
---
toc_folder_title: "\u0414\u0432\u0438\u0436\u043a\u0438\u0020\u0431\u0430\u0437\u0020\u0434\u0430\u043d\u043d\u044b\u0445"
toc_priority: 27
toc_title: "\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435"
---
# Движки баз данных {#dvizhki-baz-dannykh}
Движки баз данных обеспечивают работу с таблицами.

View File

@ -1,3 +1,8 @@
---
toc_priority: 31
toc_title: Lazy
---
# Lazy {#lazy}
Сохраняет таблицы только в оперативной памяти `expiration_time_in_seconds` через несколько секунд после последнего доступа. Может использоваться только с таблицами \*Log.

View File

@ -1,3 +1,8 @@
---
toc_priority: 30
toc_title: MySQL
---
# MySQL {#mysql}
Позволяет подключаться к базам данных на удалённом MySQL сервере и выполнять запросы `INSERT` и `SELECT` для обмена данными между ClickHouse и MySQL.

View File

@ -1,6 +1,6 @@
---
toc_folder_title: "\u0414\u0432\u0438\u0436\u043A\u0438"
toc_folder_title: "\u0045\u006e\u0067\u0069\u006e\u0065\u0073"
toc_hidden: true
toc_priority: 25
toc_title: hidden
---

View File

@ -1,3 +1,10 @@
---
toc_folder_title: "\u0414\u0432\u0438\u0436\u043a\u0438\u0020\u0442\u0430\u0431\u043b\u0438\u0446"
toc_priority: 26
toc_title: "\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435"
---
# Движки таблиц {#table_engines}
Движок таблицы (тип таблицы) определяет:

View File

@ -1,3 +1,8 @@
---
toc_priority: 4
toc_title: HDFS
---
# HDFS {#table_engines-hdfs}
Управляет данными в HDFS. Данный движок похож на движки [File](../special/file.md#table_engines-file) и [URL](../special/url.md#table_engines-url).

View File

@ -1,5 +1,5 @@
---
toc_folder_title: Integrations
toc_folder_title: "\u0414\u0432\u0438\u0436\u043a\u0438\u0020\u0442\u0430\u0431\u043b\u0438\u0446\u0020\u0434\u043b\u044f\u0020\u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438"
toc_priority: 30
---

View File

@ -1,3 +1,8 @@
---
toc_priority: 2
toc_title: JDBC
---
# JDBC {#table-engine-jdbc}
Позволяет ClickHouse подключаться к внешним базам данных с помощью [JDBC](https://en.wikipedia.org/wiki/Java_Database_Connectivity).

View File

@ -1,3 +1,8 @@
---
toc_priority: 5
toc_title: Kafka
---
# Kafka {#kafka}
Движок работает с [Apache Kafka](http://kafka.apache.org/).

View File

@ -1,3 +1,8 @@
---
toc_priority: 3
toc_title: MySQL
---
# MySQL {#mysql}
Движок MySQL позволяет выполнять запросы `SELECT` над данными, хранящимися на удалённом MySQL сервере.

View File

@ -1,3 +1,8 @@
---
toc_priority: 1
toc_title: ODBC
---
# ODBC {#table-engine-odbc}
Позволяет ClickHouse подключаться к внешним базам данных с помощью [ODBC](https://en.wikipedia.org/wiki/Open_Database_Connectivity).

View File

@ -1,6 +1,6 @@
---
toc_folder_title: Семейство Log
toc_title: Введение
toc_folder_title: "\u0421\u0435\u043c\u0435\u0439\u0441\u0442\u0432\u043e\u0020\u004c\u006f\u0067"
toc_title: "\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435"
toc_priority: 29
---

View File

@ -1,3 +1,8 @@
---
toc_priority: 33
toc_title: Log
---
# Log {#log}
Движок относится к семейству движков Log. Смотрите общие свойства и различия движков в статье [Семейство Log](index.md).

View File

@ -1,3 +1,8 @@
---
toc_priority: 32
toc_title: StripeLog
---
# StripeLog {#stripelog}
Движок относится к семейству движков Log. Смотрите общие свойства и различия движков в статье [Семейство Log](index.md).

View File

@ -1,3 +1,8 @@
---
toc_priority: 34
toc_title: TinyLog
---
# TinyLog {#tinylog}
Движок относится к семейству движков Log. Смотрите общие свойства и различия движков в статье [Семейство Log](index.md).

View File

@ -1,3 +1,8 @@
---
toc_priority: 35
toc_title: AggregatingMergeTree
---
# AggregatingMergeTree {#aggregatingmergetree}
Движок наследует функциональность [MergeTree](mergetree.md#table_engines-mergetree), изменяя логику слияния кусков данных. Все строки с одинаковым первичным ключом (точнее, с одинаковым [ключом сортировки](mergetree.md)) ClickHouse заменяет на одну (в пределах одного куска данных), которая хранит объединение состояний агрегатных функций.

View File

@ -1,3 +1,8 @@
---
toc_priority: 36
toc_title: CollapsingMergeTree
---
# CollapsingMergeTree {#table_engine-collapsingmergetree}
Движок наследует функциональность от [MergeTree](mergetree.md) и добавляет в алгоритм слияния кусков данных логику сворачивания (удаления) строк.

View File

@ -1,3 +1,9 @@
---
toc_priority: 32
toc_title: "\u041f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u044b\u0439\u0020\u043a\u043b\u044e\u0447\u0020\u043f\u0430\u0440\u0442\u0438\u0446\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f"
---
# Произвольный ключ партиционирования {#proizvolnyi-kliuch-partitsionirovaniia}
Партиционирование данных доступно для таблиц семейства [MergeTree](mergetree.md) (включая [реплицированные таблицы](replication.md)). Таблицы [MaterializedView](../special/materializedview.md#materializedview), созданные на основе таблиц MergeTree, также поддерживают партиционирование.

View File

@ -1,3 +1,8 @@
---
toc_priority: 38
toc_title: GraphiteMergeTree
---
# GraphiteMergeTree {#graphitemergetree}
Движок предназначен для прореживания и агрегирования/усреднения (rollup) данных [Graphite](http://graphite.readthedocs.io/en/latest/index.html). Он может быть интересен разработчикам, которые хотят использовать ClickHouse как хранилище данных для Graphite.

View File

@ -1,6 +1,5 @@
---
toc_folder_title: MergeTree Family
toc_priority: 28
toc_title: "\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435"
---

View File

@ -1,3 +1,8 @@
---
toc_priority: 33
toc_title: ReplacingMergeTree
---
# ReplacingMergeTree {#replacingmergetree}
Движок отличается от [MergeTree](mergetree.md#table_engines-mergetree) тем, что выполняет удаление дублирующихся записей с одинаковым значением [ключа сортировки](mergetree.md)).

View File

@ -1,3 +1,8 @@
---
toc_priority: 31
toc_title: "\u0420\u0435\u043f\u043b\u0438\u043a\u0430\u0446\u0438\u044f\u0020\u0434\u0430\u043d\u043d\u044b\u0445"
---
# Репликация данных {#table_engines-replication}
Репликация поддерживается только для таблиц семейства MergeTree:

View File

@ -1,3 +1,8 @@
---
toc_priority: 34
toc_title: SummingMergeTree
---
# SummingMergeTree {#summingmergetree}
Движок наследует функциональность [MergeTree](mergetree.md#table_engines-mergetree). Отличие заключается в том, что для таблиц `SummingMergeTree` при слиянии кусков данных ClickHouse все строки с одинаковым первичным ключом (точнее, с одинаковым [ключом сортировки](mergetree.md)) заменяет на одну, которая хранит только суммы значений из столбцов с цифровым типом данных. Если ключ сортировки подобран таким образом, что одному значению ключа соответствует много строк, это значительно уменьшает объём хранения и ускоряет последующую выборку данных.

View File

@ -1,3 +1,8 @@
---
toc_priority: 37
toc_title: VersionedCollapsingMergeTree
---
# VersionedCollapsingMergeTree {#versionedcollapsingmergetree}
Движок:

View File

@ -1,3 +1,8 @@
---
toc_priority: 45
toc_title: Buffer
---
# Buffer {#buffer}
Буферизует записываемые данные в оперативке, периодически сбрасывая их в другую таблицу. При чтении, производится чтение данных одновременно из буфера и из другой таблицы.

View File

@ -1,3 +1,8 @@
---
toc_priority: 35
toc_title: Dictionary
---
# Dictionary {#dictionary}
Движок `Dictionary` отображает данные [словаря](../../../sql-reference/dictionaries/external-dictionaries/external-dicts.md) как таблицу ClickHouse.

View File

@ -1,3 +1,8 @@
---
toc_priority: 33
toc_title: Distributed
---
# Distributed {#distributed}
**Движок Distributed не хранит данные самостоятельно**, а позволяет обрабатывать запросы распределённо, на нескольких серверах. Чтение автоматически распараллеливается. При чтении будут использованы индексы таблиц на удалённых серверах, если есть.

View File

@ -1,3 +1,8 @@
---
toc_priority: 45
toc_title: "\u0412\u043d\u0435\u0448\u043d\u0438\u0435\u0020\u0434\u0430\u043d\u043d\u044b\u0435\u0020\u0434\u043b\u044f\u0020\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438\u0020\u0437\u0430\u043f\u0440\u043e\u0441\u0430"
---
# Внешние данные для обработки запроса {#vneshnie-dannye-dlia-obrabotki-zaprosa}
ClickHouse позволяет отправить на сервер данные, необходимые для обработки одного запроса, вместе с запросом SELECT. Такие данные будут положены во временную таблицу (см. раздел «Временные таблицы») и смогут использоваться в запросе (например, в операторах IN).

View File

@ -1,3 +1,8 @@
---
toc_priority: 37
toc_title: File
---
# File(Format) {#table_engines-file}
Управляет данными в одном файле на диске в указанном формате.

View File

@ -1,5 +1,5 @@
---
toc_folder_title: Special
toc_folder_title: "\u0421\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0435\u0020\u0434\u0432\u0438\u0436\u043a\u0438\u0020\u0442\u0430\u0431\u043b\u0438\u0446"
toc_priority: 31
---

View File

@ -1,3 +1,8 @@
---
toc_priority: 40
toc_title: Join
---
# Join {#join}
Подготовленная структура данных для использования в операциях [JOIN](../../../engines/table-engines/special/join.md#select-join).

View File

@ -1,3 +1,8 @@
---
toc_priority: 43
toc_title: MaterializedView
---
# MaterializedView {#materializedview}
Используется для реализации материализованных представлений (подробнее см. запрос [CREATE TABLE](../../../sql-reference/statements/create/table.md#create-table-query)). Для хранения данных, использует другой движок, который был указан при создании представления. При чтении из таблицы, просто использует этот движок.

View File

@ -1,3 +1,8 @@
---
toc_priority: 44
toc_title: Memory
---
# Memory {#memory}
Хранит данные в оперативке, в несжатом виде. Данные хранятся именно в таком виде, в каком они получаются при чтении. То есть, само чтение из этой таблицы полностью бесплатно.

View File

@ -1,3 +1,8 @@
---
toc_priority: 36
toc_title: Merge
---
# Merge {#merge}
Движок `Merge` (не путайте с движком `MergeTree`) не хранит данные самостоятельно, а позволяет читать одновременно из произвольного количества других таблиц.

View File

@ -1,4 +1,7 @@
# Null {#null}
---
toc_priority: 38
toc_title: 'Null'
---
При записи в таблицу типа Null, данные игнорируются. При чтении из таблицы типа Null, возвращается пустота.

View File

@ -1,3 +1,8 @@
---
toc_priority: 39
toc_title: Set
---
# Set {#set}
Представляет собой множество, постоянно находящееся в оперативке. Предназначено для использования в правой части оператора IN (смотрите раздел «Операторы IN»).

View File

@ -1,3 +1,8 @@
---
toc_priority: 41
toc_title: URL
---
# URL(URL, Format) {#table_engines-url}
Управляет данными на удаленном HTTP/HTTPS сервере. Данный движок похож

View File

@ -1,3 +1,8 @@
---
toc_priority: 42
toc_title: View
---
# View {#table_engines-view}
Используется для реализации представлений (подробнее см. запрос `CREATE VIEW`). Не хранит данные, а хранит только указанный запрос `SELECT`. При чтении из таблицы, выполняет его (с удалением из запроса всех ненужных столбцов).

View File

@ -1,6 +1,6 @@
---
toc_folder_title: F.A.Q.
toc_hidden: true
toc_priority: 76
---

View File

@ -1,3 +1,8 @@
---
toc_priority: 19
toc_title: AMPLab Big Data Benchmark
---
# AMPLab Big Data Benchmark {#amplab-big-data-benchmark}
См. https://amplab.cs.berkeley.edu/benchmark/

View File

@ -1,3 +1,8 @@
---
toc_priority: 18
toc_title: "\u0422\u0435\u0440\u0430\u0431\u0430\u0439\u0442\u0020\u043b\u043e\u0433\u043e\u0432\u0020\u043a\u043b\u0438\u043a\u043e\u0432\u0020\u043e\u0442\u0020\u0043\u0072\u0069\u0074\u0065\u006f"
---
# Терабайт логов кликов от Criteo {#terabait-logov-klikov-ot-criteo}
Скачайте данные с http://labs.criteo.com/downloads/download-terabyte-click-logs/

Some files were not shown because too many files have changed in this diff Show More