I try to save my data to MySql(local DB) throw HibernateTemplate -
getHibernateTemplate().execute(new HibernateCallback<Void>() {
@Override
public Void doInHibernate(Session session) throws HibernateException, SQLException {
for (TimeInvocationStatistics stat : statistics) {
session.persist(stat);
}
session.persist(workloadProcessDescriptiveStatistics);
session.flush();
return null;
}
});
The size of data is not so big, but this operation takes over 60 sec.
I tried to profile it -
(good picture resolution - picture )
As I can see session.flush() (second row in stacktrace) works slow, how I can improve it ? Could it be MySql server problems ?
UPD: find interesting thread - hibernate forum, try to do in this way