Are there any performance issues in using composite-ids with Hibernate?

白昼怎懂夜的黑 提交于 2019-12-13 04:14:43

问题


Does anybody knows any performance issues in using composite-ids, whether @EmbeddedId or @IdClass, with Hibernate?

Thanks.


回答1:


In my opinion, Hibernate itself does not have significant performance impact whether its a composite key or not. what matters is the dbms, engine type, queries, number of updates on table, indexes and types of columns. Hibernate will just be translating hql into sql, so in this case performance of hibernate should be good if underlying queries perform good....

here is a link, where there are good explanations regarding this issue as far as MySQL is concerned

Composite Primary Key performance drawback in MySQL



来源:https://stackoverflow.com/questions/7937149/are-there-any-performance-issues-in-using-composite-ids-with-hibernate

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