在Hibernate中使用composite-id有没有任何性能问题? [英] Are there any performance issues in using composite-ids with Hibernate?
问题描述
有没有人知道使用复合id的性能问题,无论是 @EmbeddedId
还是 @IdClass
,Hibernate ?
谢谢。
对于它的组合键是否有显着的性能影响。重要的是dbms,引擎类型,查询,表上更新的数量,索引和列的类型。 Hibernate只是将hql转换为sql,所以在这种情况下,如果基础查询执行得很好,hibernate的性能应该是很好的......
这里是一个链接,那里就MySQL而言,这个问题是很好的解释。
Does anybody knows any performance issues in using composite-ids, whether @EmbeddedId
or @IdClass
, with Hibernate?
Thanks.
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
这篇关于在Hibernate中使用composite-id有没有任何性能问题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!