Spring jdbctemplate pagination

broken image
broken image

However, we should be aware that not all JDBC drivers/database servers provide the same efficiency level for batch operations even though they support it. Lastly, we can use batch support to decrease the number of roundtrips to insert a lot of entries. To be precise, the more indexed columns we have, the worse the performance will be, because the database server needs to adjust the indexes after each new row.

broken image

This helps by reusing already existing connections instead of creating new ones.Īnother significant point is the target table.

Usually, to overcome the first point, we use connection pooling. There are a few aspects we should consider when inserting a significant amount of data:

broken image