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

Optimize SQL queries when getting tabular modification of generators #411

Merged
merged 3 commits into from
Jan 4, 2024

Conversation

flomillot
Copy link
Contributor

Fix the n+1 problem when building a node with generators tabular modification.
We just have to call the right method already implemented.

@etiennehomer etiennehomer self-requested a review January 3, 2024 09:04
@@ -120,6 +120,13 @@ public void testCheckSqlRequestsCount() throws Exception {
.andReturn();
// We check that the request count is not dependent on the number of sub modifications of the tabular modification (the JPA N+1 problem is correctly solved)
assertSelectCount(3);
reset();

// Now we get back the 2 tabular modifications
Copy link
Contributor

Choose a reason for hiding this comment

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

// We get the modification group

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I just precised this to explain why we have 6 SELECT, but OK I change a bit the comment

Copy link

sonarqubecloud bot commented Jan 3, 2024

@flomillot flomillot merged commit 0c2950a into main Jan 4, 2024
3 checks passed
@flomillot flomillot deleted the fix_np1_tab_modif_gen branch January 4, 2024 09:38
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