提交 afba1805 编写于 作者: S Sergei Shtykov

CLICKHOUSEDOCS-272: More info.

上级 f6810da5
...@@ -14,7 +14,7 @@ To run ClickHouse on processors that do not support SSE 4.2 or have AArch64 or P ...@@ -14,7 +14,7 @@ To run ClickHouse on processors that do not support SSE 4.2 or have AArch64 or P
## Available Installation Options ## Available Installation Options
### From DEB Packages ### From DEB Packages {#install-from-deb-packages}
It is recommended to use official pre-compiled `deb` packages for Debian or Ubuntu. It is recommended to use official pre-compiled `deb` packages for Debian or Ubuntu.
...@@ -39,12 +39,10 @@ You can also download and install packages manually from here: <https://repo.yan ...@@ -39,12 +39,10 @@ You can also download and install packages manually from here: <https://repo.yan
#### Packages #### Packages
- clickhouse-client - `clickhouse-common-static` — Installs ClickHouse compiled binary files.
- clickhouse-server - `clickhouse-server` — Creates symbolic link for `clickhouse-server`. Installs server configuration.
- clickhouse-common - `clickhouse-client` — Creates symbolic link for `clickhouse-client `. Installs client configurations.
- clickhouse-common-static-dbg - `clickhouse-common-static-dbg` — Installs ClickHouse compiled binary files with debug info.
- clickhouse-tests
### From RPM Packages ### From RPM Packages
......
...@@ -6,7 +6,7 @@ By going through this tutorial you'll learn how to set up basic ClickHouse clust ...@@ -6,7 +6,7 @@ By going through this tutorial you'll learn how to set up basic ClickHouse clust
## Single Node Setup ## Single Node Setup
To postpone complexities of distributed environment, we'll start with deploying ClickHouse on a single server or virtual machine. ClickHouse is usually installed from [deb](index.md#from-deb-packages) or [rpm](index.md#from-rpm-packages) packages, but there are [alternatives](index.md#from-docker-image) for the operating systems that do no support them. To postpone complexities of distributed environment, we'll start with deploying ClickHouse on a single server or virtual machine. ClickHouse is usually installed from [deb](index.md#install-from-deb-packages) or [rpm](index.md#from-rpm-packages) packages, but there are [alternatives](index.md#from-docker-image) for the operating systems that do no support them.
For example, you have chosen `deb` packages and executed: For example, you have chosen `deb` packages and executed:
``` bash ``` bash
......
...@@ -4,9 +4,9 @@ ClickHouse runs sampling profiler that allows to analyse query execution. Using ...@@ -4,9 +4,9 @@ ClickHouse runs sampling profiler that allows to analyse query execution. Using
To use profiler: To use profiler:
- Setup the [trace_log][../server_settings/settings.md#server_settings-trace_log] section of the server configuration. - Setup the [trace_log](../server_settings/settings.md#server_settings-trace_log) section of the server configuration.
This section configures the [trace_log][../system_tables.md#system_tables-trace_log] system table containing the results of the profiler functioning. It is configured by default. This section configures the [trace_log](../system_tables.md#system_tables-trace_log) system table containing the results of the profiler functioning. It is configured by default.
- Setup the [query_profiler_cpu_time_period_ns](../settings/settings.md#query_profiler_cpu_time_period_ns) and [query_profiler_real_time_period_ns](../settings/settings.md#query_profiler_real_time_period_ns) settings. - Setup the [query_profiler_cpu_time_period_ns](../settings/settings.md#query_profiler_cpu_time_period_ns) and [query_profiler_real_time_period_ns](../settings/settings.md#query_profiler_real_time_period_ns) settings.
...@@ -16,7 +16,7 @@ Default sampling frequency is one sample per second. This frequency allows to ca ...@@ -16,7 +16,7 @@ Default sampling frequency is one sample per second. This frequency allows to ca
To analyze the `trace_log` system table: To analyze the `trace_log` system table:
- Install the `clickhouse-common-static-dbg` package. - Install the `clickhouse-common-static-dbg` package. See [Install from DEB Packages](../../getting_started/install.md#install-from-deb-packages).
- Allow introspection functions. - Allow introspection functions.
For security reasons introspection functions are disabled by default. For security reasons introspection functions are disabled by default.
......
...@@ -16,33 +16,40 @@ Default value: 3600. ...@@ -16,33 +16,40 @@ Default value: 3600.
``` ```
## compression ## compression {#server-settings-compression}
Data compression settings. Data compression settings for [MergeTree](../table_engines/mergetree.md)-engine tables.
!!! warning !!! warning
Don't use it if you have just started using ClickHouse. Don't use it if you have just started using ClickHouse.
The configuration looks like this: Configuration template:
```xml ```xml
<compression> <compression>
<case> <case>
<parameters/> <min_part_size>...</min_part_size>
<min_part_size_ratio>...</min_part_size_ratio>
<method>...</method>
</case> </case>
... ...
</compression> </compression>
``` ```
You can configure multiple sections `<case>`. `<case>` fields:
Block field `<case>`: - `min_part_size` – The minimum size of a data part.
- `min_part_size_ratio` – The ratio of the data part size to the table size.
- `method` – Compression method. Acceptable values: `lz4` or `zstd`.
- ``min_part_size`` – The minimum size of a table part. You can configure multiple `<case>` sections.
- ``min_part_size_ratio`` – The ratio of the minimum size of a table part to the full size of the table.
- ``method`` – Compression method. Acceptable values ​: ``lz4`` or ``zstd``(experimental).
ClickHouse checks `min_part_size` and `min_part_size_ratio` and processes the `case` blocks that match these conditions. If none of the `<case>` matches, ClickHouse applies the `lz4` compression algorithm. Actions when conditions are met:
- If a data part matches a condition set, ClickHouse uses the specified compression method.
- If a data part matches multiple condition sets, ClickHouse uses the first matched condition set.
If no conditions met for a data part, ClickHouse uses the `lz4` compression.
**Example** **Example**
......
...@@ -54,18 +54,12 @@ mysql> select * from test; ...@@ -54,18 +54,12 @@ mysql> select * from test;
Creating a table in ClickHouse server and selecting data from it: Creating a table in ClickHouse server and selecting data from it:
```sql ```sql
CREATE TABLE jdbc_table ENGINE JDBC('jdbc:mysql://localhost:3306/?user=root&password=root', 'test', 'test') CREATE TABLE jdbc_table(
``` `int_id` Int32,
```sql `int_nullable` Nullable(Int32),
DESCRIBE TABLE jdbc_table `float` Float32,
``` `float_nullable` Nullable(Float32)
```text )ENGINE JDBC('jdbc:mysql://localhost:3306/?user=root&password=root', 'test', 'test')
┌─name───────────────┬─type───────────────┬─default_type─┬─default_expression─┐
│ int_id │ Int32 │ │ │
│ int_nullable │ Nullable(Int32) │ │ │
│ float │ Float32 │ │ │
│ float_nullable │ Nullable(Float32) │ │ │
└────────────────────┴────────────────────┴──────────────┴────────────────────┘
``` ```
```sql ```sql
SELECT * SELECT *
......
...@@ -129,7 +129,7 @@ Defines storage time for values. Can be specified only for MergeTree-family tabl ...@@ -129,7 +129,7 @@ Defines storage time for values. Can be specified only for MergeTree-family tabl
### Column Compression Codecs {#codecs} ### Column Compression Codecs {#codecs}
By default, ClickHouse applies the compression method, defined in [server settings](../operations/server_settings/settings.md#compression), to columns. You can also define the compression method for each individual column in the `CREATE TABLE` query. By default, ClickHouse applies the `lz4` compression method. For `MergeTree`-engine family you can change the default compression method in the [compression](../operations/server_settings/settings.md#server-settings-compression) section of a server configuration. You can also define the compression method for each individual column in the `CREATE TABLE` query.
```sql ```sql
CREATE TABLE codec_example CREATE TABLE codec_example
...@@ -151,10 +151,10 @@ If a codec is specified, the default codec doesn't apply. Codecs can be combined ...@@ -151,10 +151,10 @@ If a codec is specified, the default codec doesn't apply. Codecs can be combined
Compression is supported for the following table engines: Compression is supported for the following table engines:
- [MergeTree](../operations/table_engines/mergetree.md) family - [MergeTree](../operations/table_engines/mergetree.md) family. Supports column compression codecs and selecting the default compression method by [compression](../operations/server_settings/settings.md#server-settings-compression) settings.
- [Log](../operations/table_engines/log_family.md) family - [Log](../operations/table_engines/log_family.md) family. Uses the `lz4` compression method by default and supports column compression codecs.
- [Set](../operations/table_engines/set.md) - [Set](../operations/table_engines/set.md). Only supported the default compression.
- [Join](../operations/table_engines/join.md) - [Join](../operations/table_engines/join.md). Only supported the default compression.
ClickHouse supports common purpose codecs and specialized codecs. ClickHouse supports common purpose codecs and specialized codecs.
......
...@@ -14,7 +14,7 @@ $ grep -q sse4_2 /proc/cpuinfo && echo "SSE 4.2 supported" || echo "SSE 4.2 not ...@@ -14,7 +14,7 @@ $ grep -q sse4_2 /proc/cpuinfo && echo "SSE 4.2 supported" || echo "SSE 4.2 not
## Доступные варианты установки ## Доступные варианты установки
### Из DEB пакетов {#from-deb-packages} ### Из DEB пакетов {#install-from-deb-packages}
Яндекс рекомендует использовать официальные скомпилированные `deb` пакеты для Debian или Ubuntu. Яндекс рекомендует использовать официальные скомпилированные `deb` пакеты для Debian или Ubuntu.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册