提交 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
## 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.
......@@ -39,12 +39,10 @@ You can also download and install packages manually from here: <https://repo.yan
#### Packages
- clickhouse-client
- clickhouse-server
- clickhouse-common
- clickhouse-common-static-dbg
- clickhouse-tests
- `clickhouse-common-static` — Installs ClickHouse compiled binary files.
- `clickhouse-server` — Creates symbolic link for `clickhouse-server`. Installs server configuration.
- `clickhouse-client` — Creates symbolic link for `clickhouse-client `. Installs client configurations.
- `clickhouse-common-static-dbg` — Installs ClickHouse compiled binary files with debug info.
### From RPM Packages
......
......@@ -6,7 +6,7 @@ By going through this tutorial you'll learn how to set up basic ClickHouse clust
## 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:
``` bash
......
......@@ -4,9 +4,9 @@ ClickHouse runs sampling profiler that allows to analyse query execution. Using
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.
......@@ -16,7 +16,7 @@ Default sampling frequency is one sample per second. This frequency allows to ca
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.
For security reasons introspection functions are disabled by default.
......
......@@ -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
Don't use it if you have just started using ClickHouse.
The configuration looks like this:
Configuration template:
```xml
<compression>
<case>
<parameters/>
<min_part_size>...</min_part_size>
<min_part_size_ratio>...</min_part_size_ratio>
<method>...</method>
</case>
...
</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.
- ``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).
You can configure multiple `<case>` sections.
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**
......
......@@ -54,18 +54,12 @@ mysql> select * from test;
Creating a table in ClickHouse server and selecting data from it:
```sql
CREATE TABLE jdbc_table ENGINE JDBC('jdbc:mysql://localhost:3306/?user=root&password=root', 'test', 'test')
```
```sql
DESCRIBE TABLE jdbc_table
```
```text
┌─name───────────────┬─type───────────────┬─default_type─┬─default_expression─┐
│ int_id │ Int32 │ │ │
│ int_nullable │ Nullable(Int32) │ │ │
│ float │ Float32 │ │ │
│ float_nullable │ Nullable(Float32) │ │ │
└────────────────────┴────────────────────┴──────────────┴────────────────────┘
CREATE TABLE jdbc_table(
`int_id` Int32,
`int_nullable` Nullable(Int32),
`float` Float32,
`float_nullable` Nullable(Float32)
)ENGINE JDBC('jdbc:mysql://localhost:3306/?user=root&password=root', 'test', 'test')
```
```sql
SELECT *
......
......@@ -129,7 +129,7 @@ Defines storage time for values. Can be specified only for MergeTree-family tabl
### 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
CREATE TABLE codec_example
......@@ -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:
- [MergeTree](../operations/table_engines/mergetree.md) family
- [Log](../operations/table_engines/log_family.md) family
- [Set](../operations/table_engines/set.md)
- [Join](../operations/table_engines/join.md)
- [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. Uses the `lz4` compression method by default and supports column compression codecs.
- [Set](../operations/table_engines/set.md). Only supported the default compression.
- [Join](../operations/table_engines/join.md). Only supported the default compression.
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
## Доступные варианты установки
### Из DEB пакетов {#from-deb-packages}
### Из DEB пакетов {#install-from-deb-packages}
Яндекс рекомендует использовать официальные скомпилированные `deb` пакеты для Debian или Ubuntu.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册