Increasing the maximum-pool-size
in your connection pool allows for more concurrent database connections. However, to take advantage of this, you need to ensure that your inserts are processed in multiple threads. By default, Spring Data JPA runs saveAll()
in a single thread, using only one database connection at a time, regardless of the connection pool size.