How can I clean up signoz clickhouse and start ove...
# support
m
How can I clean up signoz clickhouse and start over without removing and installing chart again? I don't want to loss settings
@Srikanth Chekuri
s
Do you want to truncate the tables? That would just remove the existing data, but the schemas etc. will all be there.
m
I only want to trucate existing log, traces and metrics
@Srikanth Chekuri there are docs on how to do that, or can you help me with the queries to run on database shards?
s
https://signoz.io/docs/operate/clickhouse/connect-to-clickhouse/
Copy code
TRUNCATE TABLE IF EXISTS signoz_logs.distributed_logs ON CLUSTER cluster;

TRUNCATE TABLE IF EXISTS signoz_traces.distributed_signoz_index_v2 ON CLUSTER cluster;
TRUNCATE TABLE IF EXISTS signoz_traces.distributed_signoz_spans ON CLUSTER cluster;
TRUNCATE TABLE IF EXISTS signoz_traces.distributed_signoz_error_index_v2 ON CLUSTER cluster;
TRUNCATE TABLE IF EXISTS signoz_traces.distributed_durationSort ON CLUSTER cluster;
TRUNCATE TABLE IF EXISTS signoz_traces.distributed_top_level_operations ON CLUSTER cluster;
TRUNCATE TABLE IF EXISTS signoz_traces.distributed_dependency_graph_minutes ON CLUSTER cluster;
TRUNCATE TABLE IF EXISTS signoz_traces.distributed_usage ON CLUSTER cluster;
TRUNCATE TABLE IF EXISTS signoz_traces.distributed_usage_explorer ON CLUSTER cluster;

TRUNCATE TABLE IF EXISTS signoz_metrics.distributed_samples_v2 ON CLUSTER cluster;
TRUNCATE TABLE IF EXISTS signoz_metrics.distributed_time_series_v2 ON CLUSTER cluster;
TRUNCATE TABLE IF EXISTS signoz_metrics.distributed_usage ON CLUSTER cluster;
m
@Srikanth Chekuri I ran queries but nothing changed
@Srikanth Chekuri Can you help me with that?
s
That’s surprising, can you run the queries in shard with
distributed_
in the truncate query?
m
I ran all of the queries in all of the shards
s
I don’t know what the reason could be. I will have to search.
m
fixed by truncating
logs
table
s
That’s surprising, can you run the queries in shard with
distributed_
in the truncate query?
Ah, in this message, I actually meant without distributed_ . I see it now.