Hibernate : dynamic-update dynamic-insert - Performance Effects

Viewed 22690

Using dynamic-update or dynamic-insert has positive, though generally slight only on performance, as also mentioned by http://www.mkyong.com/hibernate/hibernate-dynamic-update-attribute-example/

But the reference documentation mentions that this could have negative performance effects also as mentioned below in http://docs.jboss.org/hibernate/core/3.3/reference/en/html/mapping.html#mapping-declaration-class :

Although these settings can increase performance in some cases, they can actually decrease performance in others.

Can anybody please suggest some example/scenario mentioning negative performance impact of the same?

4 Answers

For small table dynamic is not good way since you have to waste time to execute extra step to judge which column shoud be updated and inserted. For big table it has huge performance both for traffic and sql command execution speed since there are much fewer data to fetch, query annd trasfer.

Related