Files
datastore/docs/en/sql-reference/statements/truncate.md
T
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 <[email protected]>

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

Co-authored-by: olgarev <[email protected]>

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

Co-authored-by: olgarev <[email protected]>

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

Co-authored-by: olgarev <[email protected]>

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

Co-authored-by: olgarev <[email protected]>

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

Co-authored-by: olgarev <[email protected]>

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

Co-authored-by: olgarev <[email protected]>

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

Co-authored-by: olgarev <[email protected]>

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

Co-authored-by: olgarev <[email protected]>

* Translate to Russian

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

* Fix links

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

* Update settings.md

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

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

Co-authored-by: olgarev <[email protected]>

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

Co-authored-by: olgarev <[email protected]>

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

Co-authored-by: olgarev <[email protected]>

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

Co-authored-by: olgarev <[email protected]>

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

Co-authored-by: olgarev <[email protected]>

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

Co-authored-by: olgarev <[email protected]>

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

Co-authored-by: olgarev <[email protected]>

* Fix errors

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

* Update optimize.md

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

Co-authored-by: Dmitriy <[email protected]>
Co-authored-by: olgarev <[email protected]>
2021-09-09 23:33:08 +03:00

1.3 KiB

toc_priority, toc_title
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.