You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by "hxd123456 (via GitHub)" <gi...@apache.org> on 2025/01/16 07:14:50 UTC
Re: [I] Discussion about clickhouse support in the OAP [skywalking]
hxd123456 commented on issue #11924:
URL: https://github.com/apache/skywalking/issues/11924#issuecomment-2594695273
> By analyzing the storage source code of jdbc and elasticsearch, we can find that it is feasible to use clickhouse for storage. We can learn from elasticsearch storage and use clickhouse large-width table design to give full play to the multi-column advantages of clickhouse. It is still under continuous development. I hope it will give some inspiration to developers who are using clickhouse as storage.Personal suggestions are welcome to discuss together.
Hello, I have been researching the implementation of this aspect recently. Do you have any more details, such as the ddl for segments? I have searched for statements used by other implementers.
`CREATE TABLE skywalking.segment
(
`segment_id` String,
`trace_id` String,
`service_id` LowCardinality(String),
`service_instance_id` LowCardinality(String),
`endpoint_name` String,
`endpoint_component_id` LowCardinality(String),
`start_time` DateTime64(3),
`end_time` DateTime64(3),
`latency` Int32,
`is_error` Enum8('success' = 0, 'error' = 1),
`data_binary` String,
INDEX idx_endpoint_name endpoint_name TYPE tokenbf_v1(2048, 2, 0) GRANULARITY 1,
PROJECTION p_trace_id
(
SELECT
trace_id,
groupArrayDistinct(service_id),
min(start_time) AS min_start_time,
max(start_time) AS max_start_time
GROUP BY trace_id
)
)
ENGINE = MergeTree
PARTITION BY toYYYYMMDD(start_time)
ORDER BY (start_time, service_id, endpoint_name, is_error)
TTL toDateTime(start_time) + toIntervalDay(10)`
Is this solution feasible? Looking forward to your answer
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org