Skip to content

Comments

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

Merged
KCarretto merged 1 commit intomainfrom
query-perf-fix
Nov 6, 2023
Merged

[bugfix] fix n+1 query problem, manually specify CollectFields#352
KCarretto merged 1 commit intomainfrom
query-perf-fix

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
@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