Fix N+1 Select Issues with Hibernate’s EntityGraphs

  Рет қаралды 1,889

Thorben Janssen

Thorben Janssen

Күн бұрын

Пікірлер: 19
@pedrolopezmartinez7631
@pedrolopezmartinez7631 3 ай бұрын
Thank you for sharing, Thorben. Very useful your explanation, as always.
@Thorben-Janssen
@Thorben-Janssen 3 ай бұрын
Thanks Pedro!
@ferlezcano
@ferlezcano 3 ай бұрын
Thorben, great video as always! 💪
@Thorben-Janssen
@Thorben-Janssen 3 ай бұрын
Appreciate it!
@chanchhaya
@chanchhaya 3 ай бұрын
Thank you for sharing, teacher
@Thorben-Janssen
@Thorben-Janssen 3 ай бұрын
Thanks for watching :)
@mjr-g5d
@mjr-g5d 17 күн бұрын
How can I make a composite primary key but this compsite primary key contains tow or more fields coming from another class as a foreign key in jpa
@MrMikopi
@MrMikopi 3 ай бұрын
Small question on the last part: Does that mean that it's a good practice to store all ToMany relations in Set?
@Thorben-Janssen
@Thorben-Janssen 3 ай бұрын
Yes, it is. It enables you to fetch multiple of them using JOIN FETCH clauses or EntityGraphs, and avoids some inefficient handling of many-to-many relationships
@Baalerion
@Baalerion 3 ай бұрын
What if the books can be of a different subclasses and you want to fetch the attributes that exist only on a given subclass? For example if some books are of a subclass "ScienceBook" that have a field scienceFacts and you want to fetch that also?
@Thorben-Janssen
@Thorben-Janssen 3 ай бұрын
Hibernate automatically fetches the correct subclass if you annotate your entity classes with @Inheritance to map your inheritance hierarchy
@alexmorland1619
@alexmorland1619 3 ай бұрын
Nice
@Thorben-Janssen
@Thorben-Janssen 3 ай бұрын
Thanks
@erikgollot6331
@erikgollot6331 3 ай бұрын
You should talk about cartesian product in your 2nd example. You say huge but do not give enough example to my opinion You should also insist on duplication of data on each row
@Thorben-Janssen
@Thorben-Janssen 3 ай бұрын
Thanks for the feedback. That's what I meant, when I spoke about the author who wrote 5 books with 100 reviews. I explained that in more details in the previous video and didn't want to repeat myself. Maybe that was the wrong decision
@krasnoj
@krasnoj 3 ай бұрын
​@@Thorben-Janssen For me, everything was clear. Also for erikgollot6331 was everything clear, else he could not made this suggestion.
@erikgollot6331
@erikgollot6331 3 ай бұрын
I hope you will talk about @BatchSize next
@MrMikopi
@MrMikopi 3 ай бұрын
Yes! I would especially be interested with: Setting batch sizes that effect all project vs setting a batch size for specific methods (batch / bulk methods for example).
Avoid these Mistakes - Fetching Relationships with Hibernate
13:24
Thorben Janssen
Рет қаралды 1,5 М.
JOIN FETCH with Hibernate - The end of n+1 select issues
6:32
Thorben Janssen
Рет қаралды 2,9 М.
How to treat Acne💉
00:31
ISSEI / いっせい
Рет қаралды 108 МЛН
Леон киллер и Оля Полякова 😹
00:42
Канал Смеха
Рет қаралды 4,7 МЛН
BAYGUYSTAN | 1 СЕРИЯ | bayGUYS
36:55
bayGUYS
Рет қаралды 1,9 МЛН
1% vs 100% #beatbox #tiktok
01:10
BeatboxJCOP
Рет қаралды 67 МЛН
SQLite and the N+1 (no) problem
8:30
Mycelial
Рет қаралды 9 М.
Hibernate Tip: Create an EntityGraph with multiple SubGraphs
6:18
Thorben Janssen
Рет қаралды 9 М.
How to choose the right FetchType to avoid Hibernate performance issues
9:41
Dealing with the n+1 problem in Laravel
5:47
Laravel
Рет қаралды 11 М.
Optimization - N+1 Problem Solutions - Entity Graph
19:05
Miss Xing (邢老师)
Рет қаралды 9 М.
Kotlin's better than Java? Or vice versa? Let's find out...
5:56
Jelvix | TECH IN 5 MINUTES
Рет қаралды 69 М.
Hibernate Envers: Get started in less than 9 minutes
8:45
Thorben Janssen
Рет қаралды 624
AI Is Making You An Illiterate Programmer
27:22
ThePrimeTime
Рет қаралды 253 М.
How to treat Acne💉
00:31
ISSEI / いっせい
Рет қаралды 108 МЛН