Will @Transactional cause batch updates with jdbcTemplate if used in a loop?
问题 I wanted to do batch updates using Springs JDBC template in postgre. However, I am curious that do I really need to use the jdbcTemplate.BatchUpdate() calls. I read in several places that they are slower if not implemented correctly. Will adding a @Transactional on the method that inserts in a loop achieve the same functionality of batching the updates? If the below method that inserts one record at a time, is called from a loop which is in a transactional as shown, will this cause updates to