java - Optimizing data inserts for HibernateTemplate -
i have optimize database (especially insert) performance of legacy tool. tool has been written in java , data access layer spring + hibernatetemplate technology of choice.
the actual problem doing bulk inserts. have insert more 50k data calling hibernatetemplate.save() each. apparently inefficient way because of lack of time, cannot change implementation now.
what optimization patterns other changing implementation?
the things can think of, if want optimize code without modifying code :
- try larger values hibernate.jdbc.batch_size
- use faster disk , machine database
if you're ready change code, follow the advices of documentation, , regularly flush , clear session while inserting data. or use stateless session.
Comments
Post a Comment