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?开发者_如何学Go
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.
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.
精彩评论