SQL Server函数和存储过程 [英] SQL Server Functions And Store Procedures

查看:93
本文介绍了SQL Server函数和存储过程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



用性能术语更好地使用什么,可以进行一些计算并返回相同的表或存储过程并将日期存储在永久性表上的函数?

谢谢. :)

Hi,

What is better to use in perfomance terms, An Function wich make some calculations and return a Table or Store Procedure that make the same and store dates on a permanet Table?

Thanks. :)

推荐答案

有点像苹果与橘子的比较.

由于IO问题或表锁或其他许多原因,写入表可能会降低性能.

该功能几乎可以肯定会更高效,因为它全部在内存中.但是,这也取决于函数的编写方式和作用,访问的表(如果有).
Its a bit of an apples to oranges comparison.

Writing to a table could have performance drawback because of IO issues or table locks, or a number of other reasons.

The function would almost certainly be more performant because it is all in memory. However, it also depends on how the function is written and what is does, what tables, if any, are accesssed.


链接

非常感谢很多:):thumbsup:
Thank You Very Much :) :thumbsup:


这篇关于SQL Server函数和存储过程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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