From d1d822c59a19e6d88e1c141f8396aaa9bdadd97f Mon Sep 17 00:00:00 2001 From: liuxiaobo <1224730913@qq.com> Date: Sat, 5 Jul 2025 16:16:25 +0800 Subject: [PATCH] =?UTF-8?q?click=20house=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docker/docker.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docker/docker.txt b/docker/docker.txt index ca420eb..30fd828 100644 --- a/docker/docker.txt +++ b/docker/docker.txt @@ -48,4 +48,8 @@ docker run -d \ clickhouse/clickhouse-server // 进入clickhouse容器连到数据库 show databases; -sudo docker exec -it clickhouse-server clickhouse-client --user game --password fox379@@zyxi \ No newline at end of file +sudo docker exec -it clickhouse-server clickhouse-client --user game --password fox379@@zyxi + +-- 设置 trace_log 最大分区数(自动清理旧数据) +ALTER TABLE system.trace_log MODIFY SETTING old_parts_lifetime = 3600; -- 1小时后删除旧分区 +ALTER TABLE system.text_log MODIFY SETTING old_parts_lifetime = 3600; -- 1小时后删除旧分区 \ No newline at end of file