Repository navigation
Expand file tree
/
Copy pathclickhouse-config.xml
More file actions
48 lines (40 loc) · 1.73 KB
/
Copy pathclickhouse-config.xml
File metadata and controls
48 lines (40 loc) · 1.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<clickhouse>
<!-- ============================================================
System log tables: cap retention (default is unbounded).
TTLs are applied when ClickHouse (re)creates the table on
startup. Existing log tables with a different definition get
renamed to e.g. query_log_0 — drop those after restart.
============================================================ -->
<query_log>
<ttl>event_date + INTERVAL 7 DAY DELETE</ttl>
</query_log>
<trace_log>
<ttl>event_date + INTERVAL 3 DAY DELETE</ttl>
</trace_log>
<part_log>
<ttl>event_date + INTERVAL 7 DAY DELETE</ttl>
</part_log>
<query_thread_log>
<ttl>event_date + INTERVAL 3 DAY DELETE</ttl>
</query_thread_log>
<text_log>
<ttl>event_date + INTERVAL 3 DAY DELETE</ttl>
</text_log>
<!-- Metric logs are the usual worst offenders (a row every second).
Disable entirely; delete these two blocks if you use them for
monitoring dashboards, and give them a TTL instead. -->
<metric_log remove="1"/>
<asynchronous_metric_log remove="1"/>
<!-- ============================================================
MergeTree defaults
============================================================ -->
<merge_tree>
<!-- Raise from default 100. Broken parts accumulate from
ungraceful shutdowns; the default is too conservative for
high-frequency INSERT workloads like probe_data. -->
<max_suspicious_broken_parts>500</max_suspicious_broken_parts>
<!-- Companion byte limit (default 1GB) can still block startup
even when the count limit passes. -->
<max_suspicious_broken_parts_bytes>10737418240</max_suspicious_broken_parts_bytes>
</merge_tree>
</clickhouse>