Slow sleep mode

I am trying to save my data in MySql (local DB) by dragging and dropping 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 data size is small, but this operation takes more than 60 seconds.

I tried to project it -

enter image description here

(good image resolution - picture )

As I see, session.flush () (second line in stacktrace) is slow, how can I improve it? Could there be problems with the MySql server?

UPD: find an interesting topic - hibernate forum , try to do it

+4
source share
2 answers

, TimeInvocationStatistics, . , , . , 18 . ( ), , 18 2 .

. DB . , . : . . .

+4

All Articles