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

[bugfix] fix n+1 query problem, manually specify CollectFields #352

Merged
merged 1 commit into from
Nov 6, 2023

Conversation

KCarretto
Copy link
Collaborator

What type of PR is this?

/kind bug

What this PR does / why we need it:

Recently, we encountered performance issues with large cardinality data-sets (reproducible with 50 quests, 900 tasks, 900 beacons, 300 hosts). This was due to the N+1 Query Problem. We had thought that EntGo would solve this issue for us, but as it turns out, we had to manually call CollectFields on each of our root level queries in order to enable eager-loading. We also updated the test data in order to create a large enough dataset to reproduce the issue.

Copy link
Collaborator

@Cictrone Cictrone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeet

@KCarretto KCarretto merged commit c8c4427 into main Nov 6, 2023
6 checks passed
@KCarretto KCarretto deleted the query-perf-fix branch November 6, 2023 01:17
KCarretto added a commit that referenced this pull request Feb 1, 2024
 
fix n+1 query problem, manually specify CollectFields (#352)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants