-
Notifications
You must be signed in to change notification settings - Fork 532
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[TraceQL] Improve performance of select() queries #4438
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is a shockingly difficult PR to review :). any ideas on the perf regressions? small enough that it may be just benchmark variance?
Bumped to -count=10 and benchmarks show less variance and now after is faster, so good indicator it is noise. Nothing changed with the fetch or engine for anything except select. Benchmarks
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice one!
What this PR does:
This fixes the internal processing of some traceql queries to support more cases where AllConditions should be true- notably
select()
queries. This means we can push all of the filtering down to storage more efficiently. The code change is to remove the check at the top when any multiple pipeline stages exist, and instead push let the individual elements decide. There are some remaining queries that maybe should also be AllConditions like{ } | avg(duration) > 1s
, but they are left unchanged until they can be reviewed more thoroughly.Benchmark:
Which issue(s) this PR fixes:
Fixes #
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]