在Hibernate中使用composite-id有没有任何性能问题? [英] Are there any performance issues in using composite-ids with Hibernate?

查看:116
本文介绍了在Hibernate中使用composite-id有没有任何性能问题?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有人知道使用复合id的性能问题,无论是 @EmbeddedId 还是 @IdClass ,Hibernate ?



谢谢。

解决方案

对于它的组合键是否有显着的性能影响。重要的是dbms,引擎类型,查询,表上更新的数量,索引和列的类型。 Hibernate只是将hql转换为sql,所以在这种情况下,如果基础查询执行得很好,hibernate的性能应该是很好的......



这里是一个链接,那里就MySQL而言,这个问题是很好的解释。

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆