不要存储过程真正提高性能MS SQL / .NET?存储过程、性能、MS、SQL

由网友(牵手斑马线┋)分享简介:杰夫·阿特伍德写到这里此,而我理解的理论性能提升存储过程可以报价,它看起来像一个巨大的痛苦。Jeff Atwood wrote about this here, and while I understand the theoretical performance boost a stored procedure co...

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

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.

阅读全文

相关推荐

最新文章