Hibernate dynamic-update= false

断了今生、忘了曾经 提交于 2019-12-14 01:28:41

问题


In Hibernate, the default value of the property dynamic-update = false. But it seems, that this is not good for performance. Then why is this set to false by default?


回答1:


The only drawback I can see here is that many different queries can increase a load on query parser or confuse query optimizer. Therefore Hibernate documentation recommends you to check performance impact in your particular case:

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




回答2:


The reason that they have as default dynamic-update = false is because they want to be backwards compatible to their previous hibernate versions as this is a new feature and they didn't had it before. They don't want to enable this feature by default to a project that updated to newer hibernate version and they give the developers the option to decide if they want this feature as in some cases it can decrease performance as they say.



来源:https://stackoverflow.com/questions/4709293/hibernate-dynamic-update-false

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!