Hello,
I'm doing some tests to choose the best collection fetch strategy.
I have entities with many lazy collections and i don't want to load them all. (depends on context)
In JPA / Hibernate world it exists some tests demonstrating how to choose the best strategy.
For example :
http://zeroturnaround.com/rebellabs/how-to-use-jpa-correctly-to-avoid-complaints-of-a-slow-application/
In this article,join fetch seems to be the right choice.
What about ObjectDb ? The implementation is totally different.
Is an "All eager strategy" more efficient that many join fetch ( cartesian product + distinct ). ?
In my first impressions ( not tested with metrics ), "all eager fetch" strategy seems to be more efficient than only fetch required collections.
Can you confirm my observations ?
To finish, wake up the Lazy collection (by getting size() of Collection) is a very weak solution.
In case of millions entities, you will get a request for each collection to fetch of each object !
So ... "Eager fetch all strategy" Or "Fetch Join strategy" for ObjectDb ?
Regards,
Xirt