Open mixnix opened 2 years ago
Currently, Exposed buffers all the rows within a single list, so it effectively keeps the data in memory instead of passing it to the database: https://github.com/JetBrains/Exposed/blob/0.41.1/exposed-core/src/main/kotlin/org/jetbrains/exposed/sql/statements/BaseBatchInsertStatement.kt#L19
It might be nice to have something like batchSize: Int
setting so batchInsert
would automatically call executeBatch
once in a while.
Does exposed support batch size setting for JDBC batch insert? When I insert many thousands of rows there is serious performance issue that could be fixed by that setting.