Geo
Geo

Reputation: 11

massive INSERT - spring framework

I'm doing massive import in SQL Server using my Java application with Spring Framework and SimpleJdbcInsert class. The results are not good and I'm trying to optimize it.

I support every SimpleJdbcInsert does implicit transaction so I wish to make it explicit transaction with 'begin' at the start and 'commit' at the end of my file import procedure.

How can I do this? I'm looking, but can't find it. http://static.springsource.org/spring/docs/3.0.x/spring-framework-reference/html/

Thanks!

Upvotes: 1

Views: 878

Answers (1)

chkal
chkal

Reputation: 5668

You could try to use SimpleJdbcInsert.executeBatch() to execute multiple large sets of INSERTs. Maybe this could increase performance a bit.

Upvotes: 1

Related Questions