一般来说哪个Java ORM被认为是性能最高的? [英] Which Java ORM is considered the most performant generally speaking?

查看:380
本文介绍了一般来说哪个Java ORM被认为是性能最高的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我认识到这可能意味着更少的功能,但只是想一个想法。

$ b $几年前,在我工作的地方,我们花了一些时间比较普通JDBC,Hibernate,TOPLink和Weblogic CMP对典型用例的性能(获取,更新,联合提取,部分提取等)。 Hibernate,TOPLink或Weblogic CMP并没有在普通JDBC上增加任何重要的开销。 Hibernate的性能问题很小,但这是Oracle驱动程序中的一个错误(并且团队也实施了一种解决方法)。

在说完之后,我应该补充说,让这些工具很好地发挥作用并不重要 - 人们应该很好地理解封面下发生的事情,并熟悉配置参数。而且,使用ORM生成错误的查询(例如N + 1个问题)非常容易。



最后,我们选择了Hibernate,因为我们喜欢它的编程模型非侵入性)更好,因为它是免费的(如啤酒)。

Which Java ORM is considered the most performant generally speaking?

I realize this could mean less features, but just want an idea.

解决方案

A few years ago, at the place I was working, we spend some time comparing the performance of plain JDBC, Hibernate, TOPLink and Weblogic CMP for typical usecases (fetch, updates, join fetches, partial fetches etc). Hibernate, TOPLink or Weblogic CMP did not add any significant overhead over plain JDBC. Hibernate had a minor performance issue, but that turned out to be a bug in Oracle's driver (and the team implemented a workaround too).

Having said that, I should add that making these tools perform well was non-trivial - one should have a good understanding of what is happening under the covers and be familiar with the configuration parameters. Also, it is very easy to generate bad queries (N+1 problems, for example) with ORMs.

Eventually we chose Hibernate because we liked its programing model (it is very non-intrusive) better and because it was free (as in beer).

这篇关于一般来说哪个Java ORM被认为是性能最高的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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