-
Notifications
You must be signed in to change notification settings - Fork 692
@Interleaved(lazy=false) should use Joins for Spanner #2110
Comments
Indeed, this is a useful feature request for eagerly loaded relationships. |
A separate child-repository did not help too much when we querying for a collection. |
It can be implemented to execute queries like this in case when lazy=false |
That is how we are doing now. But I'm not sure about the performance of it compare to JOIN. Which way is preferable? |
That's something we would have to test. From the implementation viewpoint it is much better to use this query then JOIN, but only makes sense if the performance is about the same. I will post results when I have them. |
I made some tests and they show that the sub-query approach is more efficient than the corresponding join-based query. |
I also have a PR for it, ready for 80-90%, remained to update tests and plan future improvements - we need an option to manage sql-where for "interleaved". |
@s13o As for future improvements, could you create an issue for that so we can discuss? Thanks |
I have no idea how to do it better, but the comments are not the best way. Can you suggest me what to do? |
Nice job! |
The next Spring Cloud release is Hoxton.SR2 and it is scheduled for February 28, 2020. Currently you should be able to use a
Let us know if you have any questions. Thanks |
Spanner Template always retries an interleaved properties of an entity by an additional query per each row instead of using joins. It causes huge query performance degradation and makes "@interleaved(lazy=false)" useless - it actually always "more or less lazy" now.
The text was updated successfully, but these errors were encountered: