You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using Micronaut-Data 4.6.x. I'm trying to persist multiple rows to my table.
@JdbcRepository(dialect = Dialect.POSTGRES)
public interface MyRepository extends PageableRepository<Foo, Long> {
}
// And then I call the `saveAll` to save multiple rows from somewhere else
public void saveData(List<Foo> lostOfData) {
myRepository.saveAll(lotsOfData);
}
I expected Micronaut to do a batch insert using a single connection+transaction. However, it turns out it not only does one insert per element of Foo but it also uses an individual DB connection. This results in performance issues as well as a starved connection pool.
I checked the docs and couldn't find a way to do this without writing my own queries, but then that defeats the purpose of using out of the box features that Micronaut Data provides.
The text was updated successfully, but these errors were encountered:
Feature description
Using Micronaut-Data 4.6.x. I'm trying to persist multiple rows to my table.
I expected Micronaut to do a batch insert using a single connection+transaction. However, it turns out it not only does one insert per element of
Foo
but it also uses an individual DB connection. This results in performance issues as well as a starved connection pool.I checked the docs and couldn't find a way to do this without writing my own queries, but then that defeats the purpose of using out of the box features that Micronaut Data provides.
The text was updated successfully, but these errors were encountered: