camel-jpa should support an option to switch from EntityManager.merge(entity)
to EntityManager.persist(entity)
--------------------------------------------------------------------------------------------------------------
Key: CAMEL-2982
URL: https://issues.apache.org/activemq/browse/CAMEL-2982
Project: Apache Camel
Issue Type: Improvement
Components: camel-jpa
Affects Versions: 2.4.0
Environment: All
Reporter: Christian Mueller
Assignee: Christian Mueller
Fix For: 2.5.0
If you use a 'heavy' normalized database schema, the switch from
EntityManager.merge(entity) to EntityManager.persist(entity) could bring a
performance boost.
The reason is, that by using EntityManager.merge(entity) the EntityManager will
query the database for each entity if this entity already exists in the
database. EntityManager.persist(entity) doesn't query the database before the
entity is persisted.
In our case, the entities are all new entities, if the Id is null and we think
we could improve our throughput with this improvement.
Christian
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.