I am currently reading about eager vs lazy loading. I am confused and comparing it to load vs no-load.
let's say i have two sections of UI.In one of them i want to show child data along with parent data and in second UI i am just showing parent data.Then i should write two different calls at database level,one is loading child data and another in loading only parent data.
How lazy/eager loading can helpful in this case because if i do lazy loading then it will consume more time in first case as it will query later rather than using joins etc. and if i use eager then it will consume time in case 2 as there is no need of child data.
Please let me correct if i am wrong and tell me some cases where eager/lazy loading can be helpful.