arnaudroger / SimpleFlatMapper

Fast and Easy mapping from database and csv to POJO. A java micro ORM, lightweight alternative to iBatis and Hibernate. Fast Csv Parser and Csv Mapper
http://simpleflatmapper.org
MIT License
435 stars 76 forks source link

Postgresql batchUpdate improvement idea #726

Open ltkn opened 4 years ago

ltkn commented 4 years ago

Hi, many thanks for this library that I'm now using successfully on multiple projects :)

As far as I understand batching queries really helps with performance. We can already do batch inserts with postgressql but no batchUpdate, batchupdate is still supported through the defaultCrud but it means one statement for each item of the collection.

The improvement idea would be to rewrite the update statement like this https://stackoverflow.com/a/26715934/5048225

Do you think it would improve performance and would consider adding this feature? it seems that it would involve using concepts from AbstractBatchInsertQueryExecutor