Skip to content

Improve performance of results with relationships [DATAJDBC-368] #592

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

Closed
spring-projects-issues opened this issue Apr 24, 2019 · 5 comments
Assignees
Labels
status: duplicate A duplicate of another issue type: enhancement A general enhancement

Comments

@spring-projects-issues
Copy link

altancabal opened DATAJDBC-368 and commented

When the returned element is an entity with relationships like the LegoSet aggregate example in the [Spring Data JDBC basics repository|https://github.com/spring-projects/spring-data-examples/tree/7b0c7a539b4d02ce6e214978f5e113c959a50f8f/jdbc/basics], then a query is executed for every element in the result.

For example, if you add repository.findAll(); at the end of the customQueries() aggregation test, after the first query is executed, an additional query is executed for every model in the result. This is very time consuming.

 
 


No further details from DATAJDBC-368

@benzen
Copy link

benzen commented Nov 30, 2022

In this it's unclear what Test is described.

I'd like to contribute at least with a failing test here.

@schauder
Copy link
Contributor

schauder commented Dec 1, 2022

Your willingness to help is appreciated. But in this case it is actually not going to be helpful. We are working on a big change which will come with plenty of tests, so a separate test wouldn't really help.

@codering
Copy link

We are working on a more efficient way to load aggregates.

Is there any update now?

@mipo256
Copy link
Contributor

mipo256 commented Feb 27, 2023

As mentioned in this issue #1434, we should also consider the ability for the use r to configure the strategy of fetching aggregate along with its children - second SELECT or JOIN

schauder added a commit that referenced this issue Mar 7, 2023
@schauder
Copy link
Contributor

Duplicate of #1445

@schauder schauder marked this as a duplicate of #1445 Apr 28, 2023
@schauder schauder closed this as not planned Won't fix, can't repro, duplicate, stale Apr 28, 2023
@schauder schauder added the status: duplicate A duplicate of another issue label Apr 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: duplicate A duplicate of another issue type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

5 participants