ClickHouse/docs/en/sql-reference/statements/truncate.md
Dmitriy 62b15122ff
DOCSUP-13875: Document the replication_wait_for_inactive_replica_timeout setting (#28464)
* Add documentation of settings

Задокументировал две настройки.

* Fix links

Поправил ссылки.

* Update docs/en/operations/settings/settings.md

Co-authored-by: olgarev <56617294+olgarev@users.noreply.github.com>

* Update docs/en/operations/settings/settings.md

Co-authored-by: olgarev <56617294+olgarev@users.noreply.github.com>

* Update docs/en/operations/settings/settings.md

Co-authored-by: olgarev <56617294+olgarev@users.noreply.github.com>

* Update docs/en/operations/settings/settings.md

Co-authored-by: olgarev <56617294+olgarev@users.noreply.github.com>

* Update docs/en/sql-reference/statements/alter/index.md

Co-authored-by: olgarev <56617294+olgarev@users.noreply.github.com>

* Update docs/en/sql-reference/statements/alter/index.md

Co-authored-by: olgarev <56617294+olgarev@users.noreply.github.com>

* Update docs/en/sql-reference/statements/optimize.md

Co-authored-by: olgarev <56617294+olgarev@users.noreply.github.com>

* Update docs/en/sql-reference/statements/truncate.md

Co-authored-by: olgarev <56617294+olgarev@users.noreply.github.com>

* Update docs/en/sql-reference/statements/truncate.md

Co-authored-by: olgarev <56617294+olgarev@users.noreply.github.com>

* Translate to Russian

Выполнил перевод на русский язык.

* Fix links

Поправил ссылки.

* Update settings.md

Поправил перевод.

* Update docs/en/operations/settings/settings.md

Co-authored-by: olgarev <56617294+olgarev@users.noreply.github.com>

* Update docs/en/sql-reference/statements/alter/index.md

Co-authored-by: olgarev <56617294+olgarev@users.noreply.github.com>

* Update docs/en/sql-reference/statements/optimize.md

Co-authored-by: olgarev <56617294+olgarev@users.noreply.github.com>

* Update docs/en/sql-reference/statements/truncate.md

Co-authored-by: olgarev <56617294+olgarev@users.noreply.github.com>

* Update docs/ru/operations/settings/settings.md

Co-authored-by: olgarev <56617294+olgarev@users.noreply.github.com>

* Update docs/ru/operations/settings/settings.md

Co-authored-by: olgarev <56617294+olgarev@users.noreply.github.com>

* Update docs/en/operations/settings/settings.md

Co-authored-by: olgarev <56617294+olgarev@users.noreply.github.com>

* Fix errors

Исправил неточности в описании.

* Update optimize.md

Поправил описание запроса OPTIMIZE.

Co-authored-by: Dmitriy <sevirov@yandex-team.ru>
Co-authored-by: olgarev <56617294+olgarev@users.noreply.github.com>
2021-09-09 23:33:08 +03:00

1.3 KiB

toc_priority toc_title
52 TRUNCATE

TRUNCATE Statement

TRUNCATE TABLE [IF EXISTS] [db.]name [ON CLUSTER cluster]

Removes all data from a table. When the clause IF EXISTS is omitted, the query returns an error if the table does not exist.

The TRUNCATE query is not supported for View, File, URL, Buffer and Null table engines.

You can use the replication_alter_partitions_sync setting to set up waiting for actions to be executed on replicas.

You can specify how long (in seconds) to wait for inactive replicas to execute TRUNCATE queries with the replication_wait_for_inactive_replica_timeout setting.

!!! info "Note" If the replication_alter_partitions_sync is set to 2 and some replicas are not active for more than the time, specified by the replication_wait_for_inactive_replica_timeout setting, then an exception UNFINISHED is thrown.