...
Testing shows there was no increase or decrease in performance compared to master branch after arrays were used.
Disadvantage: extra dependency
Extra dependencies could add possible risks of dependency issues, security issues, etc. in future.
The new dependency is an updated version of an existing dependency (hibernate-types-52) - the developer renamed the library at some point. More info here: https://vladmihalcea.com/hibernate-types-hypersistence-utils/
Disadvantage: Limited array type support
...
- More testing is needed to confirm if list partitioning drops performance with large datasets.
- Solution #1 is explicit using 32K batches, so easy to understand what it does
- Solution #2 has shorter code, but not very obvious to the reader what it does
- We could add a comment linking to this ticket to explain the 32K limit and why arrays are used
- Solution #2 simplifies code in the cases when we need Postgres array support.
- It's possible to use both solutions, where most appropriate.