-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
perf(replays): query directly on replay_id uuid instead of stripped s… #45715
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
Conversation
|
needs https://github.com/getsentry/getsentry/pull/9792 to get tests to pass |
cmanallen
left a comment
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.
Great job on this! This will be a great improvement.
|
this is currently blocked as on clickhouse 20.8, our minimum version supported, it seems we cannot supply UUIDs to an IN operator. we'd like to use the primary key as we have an index on it, so i'd like to avoid a materialized column. I'm wondering if we only make this type of search available via an environment variable, or perhaps just don't allow this type of query? Anyone have ideas for a way to query on a list of UUIDs? can see the error in the failed test. |
|
was able to fix after playing around on a clickhouse 20.3 instance for a second -- I didn't need to use the toUUID function, just had to simply ensure the uuid strings had dashes in them. |
Using our base query, it's shown that removing the string conversion / dash stripping on the replay_id column improves memory usage by ~26% and speed by ~21%. Queries pasted in at bottom.
This PR creates a new
FieldUUIDFieldas we have to do validation / conversion prior to sending our query to clickhouse, and our minimum clickhouse version doesn't have useful helpful functions so we have to work around.We also now have to strip dashes on replay_ids in the post processing of our queries. We could do the same for error_ids and trace_ids in a future PRs if we want that optimization on those fields as well.