“存储过程是预编译的”的含义是什么? [英] What is the meaning of "stored procedures are pre-compiled"?

查看:318
本文介绍了“存储过程是预编译的”的含义是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我经常听到有人说存储过程是预先编译的。这是什么意思?



实际上,我们将查询写入存储过程,然后编译它。如果有任何句法错误,它抱怨。



那么,Pre是指什么?


它们实际上是在CREATE和ALTER中检查的语法/语义



编译到查询计划按需发生



有关编译和重用的概述,请参阅SQL Server 2005中的批处理编译,重新编译和计划缓存问题



(在您的意思)回到 SQL Server 6.5 。在上一个白皮书链接中突出显示的新方式是从SQL Server 7.0开始的


I often heard people saying that stored procedures are pre-compiled. What does it mean?

Actually we write the queries into the stored proc and then compile it. If any syntactic error is there, it complains. So if that is the case then the compilation is happening at that point of time.

Then, what does "Pre" refer to?

解决方案

They are actually pre-parsed and syntax/semantics checked on CREATE and ALTER

"Compilation" to a query plan happens on demand

For an overview of compilation and re-use, see "Batch Compilation, Recompilation, and Plan Caching Issues in SQL Server 2005 "

The terminology (in what you mean) goes back to SQL Server 6.5. The "new" way highlighted in the previous white paper link started with SQL Server 7.0

这篇关于“存储过程是预编译的”的含义是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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