You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
results in a lot of additional queries, with many joins and subselects, only the first one is neccesary:
Hibernate: select conference0_.id as id1_1_, conference0_.version as version2_1_, conference0_.city as city3_1_, conference0_.name as name4_1_ from conference conference0_
Hibernate: select talks0_.conferences_id as conferen2_4_0_, talks0_.talks_id as talks_id1_4_0_, talk1_.id as id1_3_1_, talk1_.version as version2_3_1_, talk1_.summary as summary3_3_1_, talk1_.title as title4_3_1_ from talk_conferences talks0_ inner join talk talk1_ on talks0_.talks_id=talk1_.id where talks0_.conferences_id=?
Hibernate: select speakers0_.talks_id as talks_id1_5_1_, speakers0_.speakers_id as speakers2_5_1_, person1_.id as id1_2_0_, person1_.version as version2_2_0_, person1_.blog as blog3_2_0_, person1_.github_account as github_a4_2_0_, person1_.name as name5_2_0_ from talk_speakers speakers0_ inner join person person1_ on speakers0_.speakers_id=person1_.id where speakers0_.talks_id in (select talk1_.id from talk_conferences talks0_ inner join talk talk1_ on talks0_.talks_id=talk1_.id where talks0_.conferences_id=?)
Hibernate: select talks0_.speakers_id as speakers2_5_0_, talks0_.talks_id as talks_id1_5_0_, talk1_.id as id1_3_1_, talk1_.version as version2_3_1_, talk1_.summary as summary3_3_1_, talk1_.title as title4_3_1_ from talk_speakers talks0_ inner join talk talk1_ on talks0_.talks_id=talk1_.id where talks0_.speakers_id=?
Hibernate: select talks0_.speakers_id as speakers2_5_0_, talks0_.talks_id as talks_id1_5_0_, talk1_.id as id1_3_1_, talk1_.version as version2_3_1_, talk1_.summary as summary3_3_1_, talk1_.title as title4_3_1_ from talk_speakers talks0_ inner join talk talk1_ on talks0_.talks_id=talk1_.id where talks0_.speakers_id=?
Hibernate: select talks0_.speakers_id as speakers2_5_0_, talks0_.talks_id as talks_id1_5_0_, talk1_.id as id1_3_1_, talk1_.version as version2_3_1_, talk1_.summary as summary3_3_1_, talk1_.title as title4_3_1_ from talk_speakers talks0_ inner join talk talk1_ on talks0_.talks_id=talk1_.id where talks0_.speakers_id=?
Hibernate: select talks0_.speakers_id as speakers2_5_0_, talks0_.talks_id as talks_id1_5_0_, talk1_.id as id1_3_1_, talk1_.version as version2_3_1_, talk1_.summary as summary3_3_1_, talk1_.title as title4_3_1_ from talk_speakers talks0_ inner join talk talk1_ on talks0_.talks_id=talk1_.id where talks0_.speakers_id=?
Hibernate: select talks0_.speakers_id as speakers2_5_0_, talks0_.talks_id as talks_id1_5_0_, talk1_.id as id1_3_1_, talk1_.version as version2_3_1_, talk1_.summary as summary3_3_1_, talk1_.title as title4_3_1_ from talk_speakers talks0_ inner join talk talk1_ on talks0_.talks_id=talk1_.id where talks0_.speakers_id=?
Hibernate: select talks0_.speakers_id as speakers2_5_0_, talks0_.talks_id as talks_id1_5_0_, talk1_.id as id1_3_1_, talk1_.version as version2_3_1_, talk1_.summary as summary3_3_1_, talk1_.title as title4_3_1_ from talk_speakers talks0_ inner join talk talk1_ on talks0_.talks_id=talk1_.id where talks0_.speakers_id=?
Hibernate: select talks0_.speakers_id as speakers2_5_0_, talks0_.talks_id as talks_id1_5_0_, talk1_.id as id1_3_1_, talk1_.version as version2_3_1_, talk1_.summary as summary3_3_1_, talk1_.title as title4_3_1_ from talk_speakers talks0_ inner join talk talk1_ on talks0_.talks_id=talk1_.id where talks0_.speakers_id=?
Hibernate: select talks0_.speakers_id as speakers2_5_0_, talks0_.talks_id as talks_id1_5_0_, talk1_.id as id1_3_1_, talk1_.version as version2_3_1_, talk1_.summary as summary3_3_1_, talk1_.title as title4_3_1_ from talk_speakers talks0_ inner join talk talk1_ on talks0_.talks_id=talk1_.id where talks0_.speakers_id=?
Hibernate: select speakers0_.talks_id as talks_id1_5_1_, speakers0_.speakers_id as speakers2_5_1_, person1_.id as id1_2_0_, person1_.version as version2_2_0_, person1_.blog as blog3_2_0_, person1_.github_account as github_a4_2_0_, person1_.name as name5_2_0_ from talk_speakers speakers0_ inner join person person1_ on speakers0_.speakers_id=person1_.id where speakers0_.talks_id in (select talk1_.id from talk_speakers talks0_ inner join talk talk1_ on talks0_.talks_id=talk1_.id where talks0_.speakers_id=?)
Hibernate: select conference0_.talks_id as talks_id1_4_1_, conference0_.conferences_id as conferen2_4_1_, conference1_.id as id1_1_0_, conference1_.version as version2_1_0_, conference1_.city as city3_1_0_, conference1_.name as name4_1_0_ from talk_conferences conference0_ inner join conference conference1_ on conference0_.conferences_id=conference1_.id where conference0_.talks_id in (select talk1_.id from talk_speakers talks0_ inner join talk talk1_ on talks0_.talks_id=talk1_.id where talks0_.speakers_id=?)
Hibernate: select conference0_.talks_id as talks_id1_4_1_, conference0_.conferences_id as conferen2_4_1_, conference1_.id as id1_1_0_, conference1_.version as version2_1_0_, conference1_.city as city3_1_0_, conference1_.name as name4_1_0_ from talk_conferences conference0_ inner join conference conference1_ on conference0_.conferences_id=conference1_.id where conference0_.talks_id in (select talk1_.id from talk_conferences talks0_ inner join talk talk1_ on talks0_.talks_id=talk1_.id where talks0_.conferences_id=?)
Hibernate: select talks0_.conferences_id as conferen2_4_0_, talks0_.talks_id as talks_id1_4_0_, talk1_.id as id1_3_1_, talk1_.version as version2_3_1_, talk1_.summary as summary3_3_1_, talk1_.title as title4_3_1_ from talk_conferences talks0_ inner join talk talk1_ on talks0_.talks_id=talk1_.id where talks0_.conferences_id=?
Hibernate: select talks0_.conferences_id as conferen2_4_0_, talks0_.talks_id as talks_id1_4_0_, talk1_.id as id1_3_1_, talk1_.version as version2_3_1_, talk1_.summary as summary3_3_1_, talk1_.title as title4_3_1_ from talk_conferences talks0_ inner join talk talk1_ on talks0_.talks_id=talk1_.id where talks0_.conferences_id=?
Hibernate: select talks0_.conferences_id as conferen2_4_0_, talks0_.talks_id as talks_id1_4_0_, talk1_.id as id1_3_1_, talk1_.version as version2_3_1_, talk1_.summary as summary3_3_1_, talk1_.title as title4_3_1_ from talk_conferences talks0_ inner join talk talk1_ on talks0_.talks_id=talk1_.id where talks0_.conferences_id=?
Hibernate: select speakers0_.talks_id as talks_id1_5_1_, speakers0_.speakers_id as speakers2_5_1_, person1_.id as id1_2_0_, person1_.version as version2_2_0_, person1_.blog as blog3_2_0_, person1_.github_account as github_a4_2_0_, person1_.name as name5_2_0_ from talk_speakers speakers0_ inner join person person1_ on speakers0_.speakers_id=person1_.id where speakers0_.talks_id in (select talk1_.id from talk_conferences talks0_ inner join talk talk1_ on talks0_.talks_id=talk1_.id where talks0_.conferences_id=?)
Hibernate: select talks0_.speakers_id as speakers2_5_0_, talks0_.talks_id as talks_id1_5_0_, talk1_.id as id1_3_1_, talk1_.version as version2_3_1_, talk1_.summary as summary3_3_1_, talk1_.title as title4_3_1_ from talk_speakers talks0_ inner join talk talk1_ on talks0_.talks_id=talk1_.id where talks0_.speakers_id=?
Hibernate: select talks0_.speakers_id as speakers2_5_0_, talks0_.talks_id as talks_id1_5_0_, talk1_.id as id1_3_1_, talk1_.version as version2_3_1_, talk1_.summary as summary3_3_1_, talk1_.title as title4_3_1_ from talk_speakers talks0_ inner join talk talk1_ on talks0_.talks_id=talk1_.id where talks0_.speakers_id=?
Hibernate: select conference0_.talks_id as talks_id1_4_1_, conference0_.conferences_id as conferen2_4_1_, conference1_.id as id1_1_0_, conference1_.version as version2_1_0_, conference1_.city as city3_1_0_, conference1_.name as name4_1_0_ from talk_conferences conference0_ inner join conference conference1_ on conference0_.conferences_id=conference1_.id where conference0_.talks_id in (select talk1_.id from talk_conferences talks0_ inner join talk talk1_ on talks0_.talks_id=talk1_.id where talks0_.conferences_id=?)
Hibernate: select talks0_.conferences_id as conferen2_4_0_, talks0_.talks_id as talks_id1_4_0_, talk1_.id as id1_3_1_, talk1_.version as version2_3_1_, talk1_.summary as summary3_3_1_, talk1_.title as title4_3_1_ from talk_conferences talks0_ inner join talk talk1_ on talks0_.talks_id=talk1_.id where talks0_.conferences_id=?
Hibernate: select talks0_.conferences_id as conferen2_4_0_, talks0_.talks_id as talks_id1_4_0_, talk1_.id as id1_3_1_, talk1_.version as version2_3_1_, talk1_.summary as summary3_3_1_, talk1_.title as title4_3_1_ from talk_conferences talks0_ inner join talk talk1_ on talks0_.talks_id=talk1_.id where talks0_.conferences_id=?
Hibernate: select speakers0_.talks_id as talks_id1_5_0_, speakers0_.speakers_id as speakers2_5_0_, person1_.id as id1_2_1_, person1_.version as version2_2_1_, person1_.blog as blog3_2_1_, person1_.github_account as github_a4_2_1_, person1_.name as name5_2_1_ from talk_speakers speakers0_ inner join person person1_ on speakers0_.speakers_id=person1_.id where speakers0_.talks_id=?
Hibernate: select talks0_.speakers_id as speakers2_5_0_, talks0_.talks_id as talks_id1_5_0_, talk1_.id as id1_3_1_, talk1_.version as version2_3_1_, talk1_.summary as summary3_3_1_, talk1_.title as title4_3_1_ from talk_speakers talks0_ inner join talk talk1_ on talks0_.talks_id=talk1_.id where talks0_.speakers_id=?
Hibernate: select conference0_.talks_id as talks_id1_4_0_, conference0_.conferences_id as conferen2_4_0_, conference1_.id as id1_1_1_, conference1_.version as version2_1_1_, conference1_.city as city3_1_1_, conference1_.name as name4_1_1_ from talk_conferences conference0_ inner join conference conference1_ on conference0_.conferences_id=conference1_.id where conference0_.talks_id=?
The text was updated successfully, but these errors were encountered:
@havotto thanks for creating the issue. I fully agree to your point. I have created this application only as example for exampling the usage of graphql with spring. I did not focussed at all on the implication of the load on the db. Do you have a suggestion for a solution?
I don't have a solution unfortunately, but I suspect that this is due to the EAGER loading setting. I modified all EAGER to LAZY, but in that case 3 tests failed, and I have not investigated it further since that.
In another Spring-Hibernate-GraphQL example I also saw the same issues. I also would like to know what is a reliable solution for this kind of issue.
Looks good, but just executing the query
results in a lot of additional queries, with many joins and subselects, only the first one is neccesary:
The text was updated successfully, but these errors were encountered: