-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Is your feature request related to a problem? Please describe
VictoriaTraces organizes data by streams. When querying by trace_id
only, it needs to:
- Query within ALL streams.
- For each stream, query all the data from new to old by step (let's say
step=3h
) - Break when it finds the first result.
For the worst case (query with an "oldest" trace_id
), VictoriaTraces needs to scan all the data (full time range * all streams), hence poor performance.
Describe the solution you'd like
PoC of the following:
- create a helper stream
trace_id_idx
when ingesting data.- this stream contains 2 (or 3) fields:
trace_id
andtime
(orstart_time
andend_time
). - insert row to this helper stream when ingesting the root span (whose
parent_span_id
is empty).
- this stream contains 2 (or 3) fields:
- query helper stream for the time (or time range) and use it as the filter when querying by
trace_id
only.
Describe alternatives you've considered
No response
Additional information
No response
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request