https://signoz.io logo
#support
Title
# support
m

Muhammed Hussein Karimi

03/06/2023, 8:45 AM
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

Srikanth Chekuri

03/06/2023, 9:08 AM
Do you want to truncate the tables? That would just remove the existing data, but the schemas etc. will all be there.
m

Muhammed Hussein Karimi

03/06/2023, 9:08 AM
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

Srikanth Chekuri

03/06/2023, 10:20 AM
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

Muhammed Hussein Karimi

03/06/2023, 11:40 AM
@Srikanth Chekuri I ran queries but nothing changed
@Srikanth Chekuri Can you help me with that?
s

Srikanth Chekuri

03/07/2023, 7:06 AM
That’s surprising, can you run the queries in shard with
distributed_
in the truncate query?
m

Muhammed Hussein Karimi

03/07/2023, 7:10 AM
I ran all of the queries in all of the shards
s

Srikanth Chekuri

03/07/2023, 9:28 AM
I don’t know what the reason could be. I will have to search.
m

Muhammed Hussein Karimi

03/07/2023, 9:29 AM
fixed by truncating
logs
table
s

Srikanth Chekuri

03/07/2023, 9:30 AM
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.
4 Views