Hi, I set the the `Retention Period` to `1 hour` ...
# support
k
Hi, I set the the
Retention Period
to
1 hour
yesterday, but the old data is still here. How can I clean the traces/logs/metrics fro the ClickHouse database completely, please?
ChatGPT gave me this, but I’m not sure about this one:
Copy code
docker exec -it clickhouse bash
clickhouse-client -u default --password
then:
Copy code
TRUNCATE TABLE signoz_traces.signoz_index_v2;
TRUNCATE TABLE signoz_traces.signoz_spans;
TRUNCATE TABLE signoz_logs.signoz_logs;
TRUNCATE TABLE signoz_logs.signoz_log_attributes;
n
Hey @Karim
When retention settings are updated, the changes apply only to newly ingested data. Existing data retains the previous retention settings, as updating retention for existing data is a resource-intensive process.
I'm not sure whether you can rely on the queries you've shared. However, you can check how data is stored in Clickhouse, i.e., which tables are created by Signoz in these docs: https://signoz.io/docs/userguide/write-a-metrics-clickhouse-query/
k
Ok, thanks for the reply. I can wait 15 days for the data to be cleaned, it’s not a big deal, thank you