Community
Participate
Working Groups
Build Identifier: Eclipse Persistence Services - 2.1.2.v20101206-r8635 With eclipselink.jdbc.batch-writing=Oracle-JDBC specified, but without eclipselink.jdbc.batch-writing.size=nnn specified in persistence.xml, and if the EntityManager.flush() and clear() are invoked periodically within the transaction, the performance of 50,000 inserts dropped from 7.2 seconds to 92.6 seconds. If we add eclipselink.jdbc.batch-writing.size=100, or if we remove EntityManager.flush() and clear(), then the performance was back to 7.2 seconds for 50,000 inserts. See http://myforums.oracle.com/jive3/thread.jspa?threadID=746003&tstart=0 for more information. Reproducible: Always Steps to Reproduce: 1. persistence.xml contains eclipselink.jdbc.batch-writing=Oracle-JDBC but without eclipselink.jdbc.batch-writing.size=nnn 2. persist 50,000 entities in a loop 3. invoke EntityManager.flush() and clear() after every 10 inserts
Setting target and priority. See the following page for the meanings of these fields: http://wiki.eclipse.org/EclipseLink/Development/Bugs/Guidelines Community: Please vote for this bug if it is important to you. Votes are one of the main criteria we use to determine which bugs to fix next.
Issue described in the forum post is not exactly what is described in the bug. The bug should be to investigate the claim that adding a flush +clear to a loop drastically decreases performance compared to setting the batch writing mechanism size to the same interval. Ie if batchsize =100 For (int id=1; id<100000; id++{ em.persist(new Employee(id)); if (id % batchsize==0){ em.flush(); em.clear(); } } The above needs to be investigated and compared with For (int id=1; id<100000; id++{ em.persist(new Employee(id)); } To see if there is a performance decrease and if it is due to the em.flush and em.clear calls or some configuration option.
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink