Skip to content
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

Merged
merged 1 commit into from
Aug 7, 2024
Merged

Conversation

evanh
Copy link
Member

@evanh evanh commented Aug 7, 2024

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.

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.
@evanh evanh requested a review from a team as a code owner August 7, 2024 14:24
Copy link

github-actions bot commented Aug 7, 2024

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,
Copy link
Member

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?

Copy link
Member Author

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.

@evanh evanh merged commit cbbb3f8 into master Aug 7, 2024
30 checks passed
@evanh evanh deleted the evanh/fix/eap-spans-project-index branch August 7, 2024 15:50
@getsentry-bot
Copy link
Contributor

PR reverted: 0fd7734

getsentry-bot added a commit that referenced this pull request Aug 7, 2024
This reverts commit cbbb3f8.

Co-authored-by: evanh <2727124+evanh@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants