• <tfoot id='drfXA'></tfoot>

    <small id='drfXA'></small><noframes id='drfXA'>

        <i id='drfXA'><tr id='drfXA'><dt id='drfXA'><q id='drfXA'><span id='drfXA'><b id='drfXA'><form id='drfXA'><ins id='drfXA'></ins><ul id='drfXA'></ul><sub id='drfXA'></sub></form><legend id='drfXA'></legend><bdo id='drfXA'><pre id='drfXA'><center id='drfXA'></center></pre></bdo></b><th id='drfXA'></th></span></q></dt></tr></i><div id='drfXA'><tfoot id='drfXA'></tfoot><dl id='drfXA'><fieldset id='drfXA'></fieldset></dl></div>

      1. <legend id='drfXA'><style id='drfXA'><dir id='drfXA'><q id='drfXA'></q></dir></style></legend>
          <bdo id='drfXA'></bdo><ul id='drfXA'></ul>
      2. LINQ 和存储过程之间的性能差异

        Performance Difference between LINQ and Stored Procedures(LINQ 和存储过程之间的性能差异)
        <i id='pGBug'><tr id='pGBug'><dt id='pGBug'><q id='pGBug'><span id='pGBug'><b id='pGBug'><form id='pGBug'><ins id='pGBug'></ins><ul id='pGBug'></ul><sub id='pGBug'></sub></form><legend id='pGBug'></legend><bdo id='pGBug'><pre id='pGBug'><center id='pGBug'></center></pre></bdo></b><th id='pGBug'></th></span></q></dt></tr></i><div id='pGBug'><tfoot id='pGBug'></tfoot><dl id='pGBug'><fieldset id='pGBug'></fieldset></dl></div>
        <tfoot id='pGBug'></tfoot>

          <tbody id='pGBug'></tbody>
      3. <small id='pGBug'></small><noframes id='pGBug'>

          <bdo id='pGBug'></bdo><ul id='pGBug'></ul>
          • <legend id='pGBug'><style id='pGBug'><dir id='pGBug'><q id='pGBug'></q></dir></style></legend>

                1. 本文介绍了LINQ 和存储过程之间的性能差异的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  LINQ-to-SQL 与存储过程?

                  我听说过很多关于预编译存储过程的优点的讨论.但是 LINQ 和存储过程在选择、插入、更新、删除上的实际性能差异是什么?有没有人进行任何测试以查看是否有任何重大差异.我也很好奇更多的交易是否会产生影响.

                  I have heard a lot of talk back and forth about the advantages of stored procedures being pre compiled. But what are the actual performance difference between LINQ and Stored procedures on Selects, Inserts, Updates, Deletes? Has anyone run any tests at all to see if there is any major difference. I'm also curious if a greater number of transactions makes a difference.

                  我的猜测是 LINQ 语句在第一个事务之后被缓存,性能可能几乎相同.想法?

                  My guess is that LINQ statements get cached after the first transaction and performance is probably going to be nearly identical. Thoughts?

                  推荐答案

                  LINQ 应该在性能上接近,但我不同意上面说 LINQ 更快的说法,它不可能更快,它可能就像不过很快,其他条件都一样.

                  LINQ should be close in performance but I disagree with the statement above that says LINQ is faster, it can't be faster, it could possibly be just as as fast though, all other things being equal.

                  我认为不同之处在于,知道如何优化并使用存储过程的优秀 SQL 开发人员在性能上总是略有优势.如果你不擅长 SQL,让 Linq 为你解决,你的表现很可能会被接受.如果您是一名强大的 SQL 开发人员,如果您的应用需要,可以使用存储过程来挤出一点额外的性能.

                  I think the difference is that a good SQL developer, who knows how to optimize, and uses stored procedures is always going to have a slight edge in performance. If you are not strong on SQL, let Linq figure it out for you, and your performance is most likely going to be acceptable. If you are a strong SQL developer, use stored procedures to squeeze out a bit of extra performance if you app requires it.

                  如果您编写糟糕的 SQL 来编写一些执行速度比 Linq 慢的存储过程,这当然是可能的,但是如果您知道自己在做什么,那么存储过程和 Datareader 就无敌了.

                  It certainly is possible if you write terrible SQL to code up some stored procedures that execute slower than Linq would, but if you know what you are doing, stored procedures and a Datareader can't be beat.

                  这篇关于LINQ 和存储过程之间的性能差异的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Accessing another user#39;s table within an Oracle Stored Procedure(在 Oracle 存储过程中访问另一个用户的表)
                  Maximum stored procedure, function, trigger, or view nesting level exceeded (limit 32)(超出最大存储过程、函数、触发器或视图嵌套级别(限制 32))
                  How to View Oracle Stored Procedure using SQLPlus?(如何使用 SQLPlus 查看 Oracle 存储过程?)
                  How to debug stored procedure in VS 2015?(如何在 VS 2015 中调试存储过程?)
                  How to Pass Java List of Objects to Oracle Stored Procedure Using MyBatis?(如何使用 MyBatis 将 Java 对象列表传递给 Oracle 存储过程?)
                  Set the variable result, from query(设置变量结果,来自查询)
                  <tfoot id='FXyLL'></tfoot>

                      <tbody id='FXyLL'></tbody>
                    1. <i id='FXyLL'><tr id='FXyLL'><dt id='FXyLL'><q id='FXyLL'><span id='FXyLL'><b id='FXyLL'><form id='FXyLL'><ins id='FXyLL'></ins><ul id='FXyLL'></ul><sub id='FXyLL'></sub></form><legend id='FXyLL'></legend><bdo id='FXyLL'><pre id='FXyLL'><center id='FXyLL'></center></pre></bdo></b><th id='FXyLL'></th></span></q></dt></tr></i><div id='FXyLL'><tfoot id='FXyLL'></tfoot><dl id='FXyLL'><fieldset id='FXyLL'></fieldset></dl></div>

                          <legend id='FXyLL'><style id='FXyLL'><dir id='FXyLL'><q id='FXyLL'></q></dir></style></legend>
                            <bdo id='FXyLL'></bdo><ul id='FXyLL'></ul>

                            <small id='FXyLL'></small><noframes id='FXyLL'>