-
-
Notifications
You must be signed in to change notification settings - Fork 57
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
feat(eap): Add index on project_id #6182
Conversation
The project_id is heavily used in queries, to narrow down to specific services. Add a bloom filter index on it to help improve query performance.
This PR has a migration; here is the generated SQL -- start migrations
-- forward migration events_analytics_platform : 0002_eap_spans_project_id_index
Local op: ALTER TABLE eap_spans_local ADD INDEX IF NOT EXISTS bf_project_id project_id TYPE bloom_filter GRANULARITY 1;
-- end forward migration events_analytics_platform : 0002_eap_spans_project_id_index
-- backward migration events_analytics_platform : 0002_eap_spans_project_id_index
Local op: ALTER TABLE eap_spans_local DROP INDEX IF EXISTS bf_project_id;
-- end backward migration events_analytics_platform : 0002_eap_spans_project_id_index |
index_name="bf_project_id", | ||
index_expression="project_id", | ||
index_type="bloom_filter", | ||
granularity=1, |
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.
how did you choose the granularity?
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.
These indexes use (relatively) low amounts of memory, so we have the granularity set to the minimum.
PR reverted: 0fd7734 |
This reverts commit cbbb3f8. Co-authored-by: evanh <2727124+evanh@users.noreply.github.com>
The project_id is heavily used in queries, to narrow down to specific services.
Add a bloom filter index on it to help improve query performance.