ORM (esp. NHibernate) performance for complex queries

前端 未结 3 671
滥情空心
滥情空心 2021-02-14 15:26

My company is in the process of rewriting an existing application from scratch. This application, among other tasks, performs complex SQL queries against order and invoice data

相关标签:
3条回答
  • 2021-02-14 16:05

    NHibernate has a bit of a learning curve, but it is well worth learning as any time spent will pay off many times over. I would recommend NHibernate in Action book for learning as it is an excellent resource and covers everything your question asks and a whole lot more.

    NHibernate performance can be tuned (see links below) and NHibernate has robust caching mechanism.

    http://www.codeproject.com/KB/database/NHibernate_Perf.aspx https://www.hibernate.org/hib_docs/nhibernate/html/performance.html

    Ultimately the performance will be determined by who writes the queries as it is in SQL.

    0 讨论(0)
  • 2021-02-14 16:09

    If you are looking for ORM with comprehensive and efficient LINQ translator, I recommend you to try Entity Framework or DataObjects.Net. I'm not sure about Oracle Lite support. NHibernate's LINQ translator is not fully finished yet.

    Anyway the best thing you can do now is to download leading ORM tools and test them on tricky queries with grouping, joining, subqueries etc.

    0 讨论(0)
  • 2021-02-14 16:13

    See this chart. There is no DataObjects.Net for now, but its results in comparison to EF and NHibernate are shown here.

    LINQ test code for EF is here; versions for other tools can be found in the same folder. All these .cs files are generated by a single T4 template, so tests are fully identical. Model used there is Northwind.

    Few more links:

    • LINQ test description
    • FAQs.
    0 讨论(0)
提交回复
热议问题