Skip to content

DOCS-625: system.query_thread_log - #11437

Merged
BayoNet merged 11 commits into
ClickHouse:masterfrom
BayoNet:docs/CLICKHOUSEDOCS-625-system.query-thread-log
Jun 5, 2020
Merged

BayoNet merged 11 commits into
ClickHouse:masterfrom
BayoNet:docs/CLICKHOUSEDOCS-625-system.query-thread-log

Conversation

@BayoNet

@BayoNet BayoNet commented Jun 4, 2020

Copy link
Copy Markdown
Contributor

I hereby agree to the terms of the CLA available at: https://yandex.ru/legal/cla/?lang=en

Changelog category:

  • Documentation

Sergei Shtykov and others added 10 commits May 4, 2020 19:24
…the example. (#119)

* This file was edited according to the DOCSUP-1041. Text was ordered with example, links and missed information were added.

* Editing using comments.

* Edited according connected merge.

* Seems to be pre-last changes.
Comment thread docs/en/operations/system-tables.md Outdated
Most of system tables store their data in RAM. ClickHouse server creates such system tables at the start.

The [metric_log](#system_tables-metric_log), [query_log](#system_tables-query_log), [query_thread_log](#system_tables-query_thread_log), [trace_log](#system_tables-trace_log) system tables store data in a storage filesystem. You can alter them or remove from a disk manually. If you remove one of that tables from a disk, the ClickHouse server creates the table again at the time of the next recording. A storage period for these tables is not limited, and ClickHouse server doesn't delete their data automatically. You need to organize removing of outdated logs by yourself. For example, you can use [TTL](../sql-reference/statements/alter.md#manipulations-with-table-ttl) settings for removing outdated log records.
The system tables [metric_log](#system_tables-metric_log), [query_log](#system_tables-query_log), [query_thread_log](#system_tables-query_thread_log), [trace_log](#system_tables-trace_log) are served by [MergeTree](../engines/table-engines/mergetree-family/mergetree.md) table engine that store data in a storage filesystem. You can alter some properties of these tables or remove them from a filesystem manually. If you remove a table from a filesystem, the ClickHouse server creates the empty one again at the time of the next data writing. A storage period for these tables is not limited, and ClickHouse server doesn't delete their data automatically. You need to organize removing of outdated logs by yourself. For example, you can use [TTL](../sql-reference/statements/alter.md#manipulations-with-table-ttl) settings for removing outdated log records. Also you can use the partitioning feature of `MergeTree`-engine tables.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

store data in a storage filesystem - not clear, what we wanted to say.
A storage period for these tables is not limited, and ClickHouse server doesn't delete their data automatically - Better to tell that default behavior is not to remove this data, but we can use TTL.

You can alter some properties of these tables or remove them from a filesystem manually. it is not clear why we want to do so. lets check that properties are not changes via configuration.

If system table Schema changed in new release old tables are renamed and new ones are created.

Comment thread docs/en/operations/system-tables.md Outdated

The flushing period of logs is set in `flush_interval_milliseconds` parameter of the [query_thread_log](server-configuration-parameters/settings.md#server_configuration_parameters-query_thread_log) server settings section. To force logs flushing, use the [SYSTEM FLUSH LOGS](../sql-reference/statements/system.md#query_language-system-flush_logs) query.

ClickHouse doesn't delete logs from the table automatically. See [Introduction](#system-tables-introduction) for more details.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
ClickHouse doesn't delete logs from the table automatically. See [Introduction](#system-tables-introduction) for more details.
ClickHouse doesn't delete data from the table automatically. See [Introduction](#system-tables-introduction) for more details.

@BayoNet
BayoNet merged commit 905c58b into ClickHouse:master Jun 5, 2020
@BayoNet
BayoNet deleted the docs/CLICKHOUSEDOCS-625-system.query-thread-log branch June 5, 2020 09:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants