Repository navigation
Conversation
…LICKHOUSEDOCS-625-system.query-thread-log
…LICKHOUSEDOCS-625-system.query-thread-log
…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.
…LICKHOUSEDOCS-625-system.query-thread-log
qoega
reviewed
Jun 4, 2020
| 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. |
Member
There was a problem hiding this comment.
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.
|
|
||
| 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. |
Member
There was a problem hiding this comment.
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I hereby agree to the terms of the CLA available at: https://yandex.ru/legal/cla/?lang=en
Changelog category: