我们应该使用NHibernate吗? [英] Should we use NHibernate

查看:129
本文介绍了我们应该使用NHibernate吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们是一款处理大量数据的ERP产品,我们使用NHibernate和Burrow通过DAO Layer开发了它。现在一年之后,许多性能问题开始蔓延。主要是批量数据读写操作。



现在我们对如何提高性能毫无头绪。我们已经阅读了很多文章并实施了无状态会话,但仍然没有改进。



有人可以建议一个解决方法吗?我们不希望通过使用存储过程绑定到DBMS。



所有ORM都以相同的方式工作吗?

解决方案

不幸的是,您几乎无法控制ORM生成的SQL(在本例中为NHibernate)。



没有简单的方法可以提高性能,但是一个好的起点就是运行查询分析器并查看NHibernate在查询不同数据时正在做什么条件。从那里,您可以开始考虑修改代码以提高性能的方法。



根据我的经验,ORM不适用于需要可扩展性的应用程序原因。

Ours is an ERP Product which deals with huge amounts of Data and we have developed it with a DAO Layer using NHibernate and Burrow. Now after one year many performance issues started creeping up. Mainly with Bulk Data Read & Write operations.

And now we are clueless on how to increase the performance. We have gone through lot of articles and implemented Stateless Sessions, but still no improvement.

Can anybody please suggest a way out of this? We don't want to get tied to a DBMS by using Stored Procedures.

Do all ORM work the same way?

解决方案

Unfortunately, you have very little control over the SQL being generated by the ORM (in this case, NHibernate).

There's no easy way to improve performance, but a good place to start would be to run query analyzer and see what NHibernate is doing when you query it for data under different conditions. From there, you can start thinking about ways to modify your code to improve performance.

In my experience, ORM's are not suitable for applications where scalability is required for this very reason.


这篇关于我们应该使用NHibernate吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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