Fixed documentation build (#8266)

* Link fix.

* Fixed something.
This commit is contained in:
BayoNet 2019-12-18 14:35:25 +03:00 committed by GitHub
parent d1cc5e6fed
commit 663b68cd08
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 19 deletions

View File

@ -189,7 +189,7 @@ SELECT geohashDecode('ezs42') AS res
└─────────────────────────────────┘
```
## h3IsValid {#h3IsValid}
## h3IsValid {#h3isvalid}
Проверяет корректность H3-индекса.
@ -234,7 +234,7 @@ h3GetResolution(h3index)
**Возвращаемые значения**
- Разрешение сетки, от 0 до 15.
- Для несуществующего идентификатора может быть возвращено произвольное значение, используйте [h3IsValid](#h3IsValid) для проверки идентификаторов
- Для несуществующего идентификатора может быть возвращено произвольное значение, используйте [h3IsValid](#h3isvalid) для проверки идентификаторов
Тип — [UInt8](../../data_types/int_uint.md).

View File

@ -82,11 +82,9 @@ CREATE TABLE [IF NOT EXISTS] [db.]table_name ENGINE = engine AS SELECT ...
### Constraints {#constraints}
WARNING: This feature is experimental. Correct work is not guaranteed on non-MergeTree family engines.
Along with columns descriptions constraints could be defined:
``sql
```sql
CREATE TABLE [IF NOT EXISTS] [db.]table_name [ON CLUSTER cluster]
(
name1 [type1] [DEFAULT|MATERIALIZED|ALIAS expr1] [compression_codec] [TTL expr1],
@ -100,15 +98,15 @@ CREATE TABLE [IF NOT EXISTS] [db.]table_name [ON CLUSTER cluster]
Adding large amount of constraints can negatively affect performance of big `INSERT` queries.
### TTL expression
### TTL Expression
Defines storage time for values. Can be specified only for MergeTree-family tables. For the detailed description, see [TTL for columns and tables](../operations/table_engines/mergetree.md#table_engine-mergetree-ttl).
## Column Compression Codecs {#codecs}
### Column Compression Codecs {#codecs}
By default, ClickHouse applies to columns the compression method, defined in [server settings](../operations/server_settings/settings.md#compression). Also, you can define compression method for each individual column in the `CREATE TABLE` query.
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.
```
```sql
CREATE TABLE codec_example
(
dt Date CODEC(ZSTD),
@ -121,23 +119,23 @@ ENGINE = <Engine>
...
```
If a codec is specified, the default codec doesn't apply. Codecs can be combined in a pipeline, for example, `CODEC(Delta, ZSTD)`. To select the best codecs combination for you project, pass benchmarks, similar to described in the Altinity [New Encodings to Improve ClickHouse Efficiency](https://www.altinity.com/blog/2019/7/new-encodings-to-improve-clickhouse) article.
If a codec is specified, the default codec doesn't apply. Codecs can be combined in a pipeline, for example, `CODEC(Delta, ZSTD)`. To select the best codec combination for you project, pass benchmarks similar to described in the Altinity [New Encodings to Improve ClickHouse Efficiency](https://www.altinity.com/blog/2019/7/new-encodings-to-improve-clickhouse) article.
!!!warning
You cannot decompress ClickHouse database files with external utilities, for example, `lz4`. Use the special utility, [clickhouse-compressor](https://github.com/ClickHouse/ClickHouse/tree/master/dbms/programs/compressor).
!!!warning "Warning"
You can't decompress ClickHouse database files with external utilities like `lz4`. Instead, use the special [clickhouse-compressor](https://github.com/yandex/ClickHouse/tree/master/dbms/programs/compressor) utility.
Compression is supported for the table engines:
Compression is supported for the following table engines:
- [*MergeTree](../operations/table_engines/mergetree.md) family
- [*Log](../operations/table_engines/log_family.md) family
- [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)
ClickHouse supports common purpose codecs and specialized codecs.
### Specialized codecs {#create-query-specialized-codecs}
#### Specialized Codecs {#create-query-specialized-codecs}
These codecs are designed to make compression more effective using specifities of the data. Some of this codecs don't compress data by itself, but they prepare data to be compressed better by common purpose codecs.
These codecs are designed to make compression more effective by using specific features of data. Some of these codecs don't compress data themself. Instead, they prepare the data for a common purpose codec, which compresses it better than without this preparation.
Specialized codecs:
@ -157,7 +155,7 @@ CREATE TABLE codec_example
ENGINE = MergeTree()
```
### Common purpose codecs {#create-query-common-purpose-codecs}
#### Common purpose codecs {#create-query-common-purpose-codecs}
Codecs:
@ -166,7 +164,8 @@ Codecs:
- `LZ4HC[(level)]` — LZ4 HC (high compression) algorithm with configurable level. Default level: 9. Setting `level <= 0` applies the default level. Possible levels: [1, 12]. Recommended level range: [4, 9].
- `ZSTD[(level)]` — [ZSTD compression algorithm](https://en.wikipedia.org/wiki/Zstandard) with configurable `level`. Possible levels: [1, 22]. Default value: 1.
High compression levels useful for asymmetric scenarios, like compress once, decompress a lot of times. Greater levels stands for better compression and higher CPU usage.
High compression levels are useful for asymmetric scenarios, like compress once, decompress repeatedly. Higher levels mean better compression and higher CPU usage.
## 临时表