Open
Description
This is an Epic gathering various approaches to improve the writing behaviour of Spring Data JDBC.
If we have an Aggregate Root A
referencing entities B
on update the following SQL statements get executed:
- delete all previously referenced
B
s - update
A
- insert all now referenced
B
s
We should improve this in multiple ways:
- Use upserts on
B
s and only delete those not longer present Use batched statements for inserts (and updates)This is implemented.- Allow detection of changed
B
s. There are various possibilities how to do this- have an annotated attribute carrying this information
- wrap everything in proxies to track this (I really don't like this because I think it's opening a can of worms)
- one way or the other compare with the version currently in the database. Not sure how to do that, possibly with a JDBC specific API
Also, performancetests would be nice and probably a good first step.
Create separate issues to work on any of these. Use this issue to discuss these and other strategies to improve persisting performance.
Jens Schauder opened this ticket as DATAJDBC-210