简体   繁体   English

ActiveJDBC的表现

[英]ActiveJDBC performance

Today I've found some interesting library - ActiveJDBC . 今天我发现了一些有趣的图书馆--ActiveJDBC It provides RoR-like ActiveRecord interface, and I'm thinking on Hibernate replacement, but there is a question - can ActiveJDBC handle really big queries and results and is it clever to use it instead of Hibernate in any application? 它提供了类似RoR的ActiveRecord接口,我正在考虑更换Hibernate,但是有一个问题 - ActiveJDBC可以处理真正大的查询和结果吗?在任何应用程序中使用它而不是Hibernate是否聪明?

I'm a developer of ActiveJDBC, so take my advice with a grain of salt :). 我是ActiveJDBC的开发人员,所以请接受我的建议。 I have not performed extensive performance comparison tests, but simple tests (storing and reading tens of thousands of records) revealed that ActiveJDBC is about twice as slow as JDBC, and Hibernate is about twice as slow as ActiveJDBC, which makes Hibernate about 4 times slower than plain JDBC. 我没有进行过广泛的性能比较测试,但是简单的测试(存储和读取成千上万条记录)显示ActiveJDBC的速度是JDBC的两倍,而Hibernate的速度是ActiveJDBC的两倍,这使得Hibernate慢了大约4倍比普通的JDBC。 Overall, ActiveJDBC is a lot thinner than Hibernate, that was the idea for developing it. 总的来说,ActiveJDBC比Hibernate要薄很多,这就是开发它的想法。 Please see this blog: Just how thin can a framework be? 请参阅此博客: 框架有多薄? ActiveJDBC vs Hibernate. ActiveJDBC vs Hibernate。

Hibernate is architecturally built with client/server model in mind in the 90s (sessions, lazy loading, object graphs. etc.), while ActiveJDBC was built in 2009 primarily for request/response of modern web applications and uses a pass-through model. Hibernate在体系结构上构建了90年代的客户端/服务器模型(会话,延迟加载,对象图等),而ActiveJDBC建于2009年,主要用于现代Web应用程序的请求/响应,并使用传递模型。 Depending on your logic, data and database optimizations, your mileage will vary, but I'm confident that ActiveJDBC will almost certainly be faster. 根据您的逻辑,数据和数据库优化,您的里程会有所不同,但我相信ActiveJDBC几乎肯定会更快。 Mubin pointed out the fact that you will need migrations. 穆宾指出你需要迁移的事实。 I'd say this is partly correct. 我会说这部分是正确的。 Migrations system is always a good idea, but ActiveJDBC does not care how tables were created, as long as they exist. 迁移系统总是一个好主意,但ActiveJDBC并不关心如何创建表,只要它们存在。

cheers 干杯

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM