mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-20 08:40:50 +00:00
Merge pull request #27536 from adevyatova/annadevyatova-DOCSUP-11968-explain
DOCSUP-11968: Document the SQL-statement EXPLAIN ESTIMATE
This commit is contained in:
commit
c0e1c42562
@ -1,3 +1,8 @@
|
||||
---
|
||||
toc_priority: 36
|
||||
toc_title: Replicated
|
||||
---
|
||||
|
||||
# [experimental] Replicated {#replicated}
|
||||
|
||||
The engine is based on the [Atomic](../../engines/database-engines/atomic.md) engine. It supports replication of metadata via DDL log being written to ZooKeeper and executed on all of the replicas for a given database.
|
||||
|
@ -384,5 +384,32 @@ ExpressionTransform
|
||||
(ReadFromStorage)
|
||||
NumbersMt × 2 0 → 1
|
||||
```
|
||||
### EXPLAIN ESTIMATE {#explain-estimate}
|
||||
|
||||
Shows the estimated number of rows, marks and parts to be read from the tables while processing the query. Works with tables in the [MergeTree](../../engines/table-engines/mergetree-family/mergetree.md#table_engines-mergetree) family.
|
||||
|
||||
**Example**
|
||||
|
||||
Creating a table:
|
||||
|
||||
```sql
|
||||
CREATE TABLE ttt (i Int64) ENGINE = MergeTree() ORDER BY i SETTINGS index_granularity = 16, write_final_mark = 0;
|
||||
INSERT INTO ttt SELECT number FROM numbers(128);
|
||||
OPTIMIZE TABLE ttt;
|
||||
```
|
||||
|
||||
Query:
|
||||
|
||||
```sql
|
||||
EXPLAIN ESTIMATE SELECT * FROM ttt;
|
||||
```
|
||||
|
||||
Result:
|
||||
|
||||
```text
|
||||
┌─database─┬─table─┬─parts─┬─rows─┬─marks─┐
|
||||
│ default │ ttt │ 1 │ 128 │ 8 │
|
||||
└──────────┴───────┴───────┴──────┴───────┘
|
||||
```
|
||||
|
||||
[Оriginal article](https://clickhouse.tech/docs/en/sql-reference/statements/explain/) <!--hide-->
|
||||
|
@ -1,3 +1,7 @@
|
||||
---
|
||||
toc_priority: 36
|
||||
toc_title: Replicated
|
||||
---
|
||||
|
||||
# [экспериментальный] Replicated {#replicated}
|
||||
|
||||
|
@ -385,4 +385,32 @@ ExpressionTransform
|
||||
NumbersMt × 2 0 → 1
|
||||
```
|
||||
|
||||
### EXPLAIN ESTIMATE {#explain-estimate}
|
||||
|
||||
Отображает оценки числа строк, засечек и кусков, которые будут прочитаны при выполнении запроса. Применяется для таблиц семейства [MergeTree](../../engines/table-engines/mergetree-family/mergetree.md#table_engines-mergetree).
|
||||
|
||||
**Пример**
|
||||
|
||||
Создадим таблицу:
|
||||
|
||||
```sql
|
||||
CREATE TABLE ttt (i Int64) ENGINE = MergeTree() ORDER BY i SETTINGS index_granularity = 16, write_final_mark = 0;
|
||||
INSERT INTO ttt SELECT number FROM numbers(128);
|
||||
OPTIMIZE TABLE ttt;
|
||||
```
|
||||
|
||||
Запрос:
|
||||
|
||||
```sql
|
||||
EXPLAIN ESTIMATE SELECT * FROM ttt;
|
||||
```
|
||||
|
||||
Результат:
|
||||
|
||||
```text
|
||||
┌─database─┬─table─┬─parts─┬─rows─┬─marks─┐
|
||||
│ default │ ttt │ 1 │ 128 │ 8 │
|
||||
└──────────┴───────┴───────┴──────┴───────┘
|
||||
```
|
||||
|
||||
[Оригинальная статья](https://clickhouse.tech/docs/ru/sql-reference/statements/explain/) <!--hide-->
|
||||
|
Loading…
Reference in New Issue
Block a user