不要存储过程真正提高性能MS SQL / .NET? [英] Do Stored Procedures really boost performance in MS SQL / .NET?

查看:154
本文介绍了不要存储过程真正提高性能MS SQL / .NET?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

杰夫·阿特伍德写到这里此,而我理解的理论性能提升存储过程可以报价,它看起来像一个巨大的痛苦。

Jeff Atwood wrote about this here, and while I understand the theoretical performance boost a stored procedure could offer, it does seem like a tremendous pain.

你会看到什么类型的查询使用存储过程的最性能提升,以及什么类型的查询,你宁愿只是建立在飞?

What types of queries would you see the most performance increase using stored procedures, and what types of queries would you rather just build on the fly?

编辑:任何文件或那种方式会大大AP preciated - 谢谢

Any documentation one way or another would be greatly appreciated - thanks!

推荐答案

该存储过程/没有存储的特效参数已经成为一个宗教问题。对于每个人的强调了特效优化的执行计划,另一个指出常见的动态查询缓存,并在最现代的DBMS优化。对于任何人都指出,安全一个进程可能会提供,另一种解释,动态查询可一样安全。有些人喜欢变化的一个进程而无需重新编译您的应用程序的灵活性,而其他人则认为查询应该在app code被捕获,使他们生活和成长在同一code碱基。

The stored proc/no stored procs argument has become a religious issue. For every person that emphasizes optimized execution plans for procs, another points out common dynamic queries are cached and optimized in most modern DBMSes. For anyone that points out the security a proc might offer, another explains that dynamic queries can be made just as secure. Some like the flexibility of changing a proc without recompiling your app, while others argue queries should be captured in app code so they live and grow in the same code base.

我说......

你喜欢什么。我怀疑我们能拿出正确的答案。如果特效是件麻烦事,不使用它们。如果他们似乎是一个好主意,去了。我已经与这两种模式工作,我真的没有preference。我是生产带或不带他们。

Do what you like. I doubt we can come up with the correct answer. If procs are a hassle, don't use them. If they seem like a good idea, go for it. I've worked with both models and I honestly don't have a preference. I'm productive with or without 'em.

这篇关于不要存储过程真正提高性能MS SQL / .NET?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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