Interpreted Transact-SQL stored procedures are compiled at first execution, in contrast to natively compiled stored procedures,

which are compiled at create time. When interpreted stored procedures are compiled at invocation, the values of the parameters

supplied for this invocation are used by the optimizer when generating the execution plan.This use of parameters during

compilation is called parameter sniffing.

Parameter sniffing is not used for compiling natively compiled stored procedures. All parameters to the stored procedure are

considered to have UNKNOWN values.Like interpreted stored procedures, natively compiled stored procedures also support

the OPTIMIZE FOR hint.

------------------------------------------------

Natively Compiled Stored Procedures在创建时编译,所有参数都视为UNKNOWN值,因此很有可能会生成比较中庸的执行计划。可视情况考虑

使用OPTIMIZE FOR hint来优化。

本文链接:http://www.cnblogs.com/ajiangg/p/6438556.html

参考链接:

https://msdn.microsoft.com/en-us/library/dn205319.aspx

关于Natively Compiled Stored Procedures的优化的更多相关文章

  1. SQL Server ->> Natively Compiled Stored Procedures(本地编译存储过程)

    Comming soon! 参考: Natively Compiled Stored Procedures

  2. Drop all the tables, stored procedures, triggers, constraints and all the dependencies in one SQL statement

    Is there any way in which I can clean a database in SQl Server 2005 by dropping all the tables and d ...

  3. Home / Python MySQL Tutorial / Calling MySQL Stored Procedures in Python Calling MySQL Stored Procedures in Python

    f you are not familiar with MySQL stored procedures or want to review it as a refresher, you can fol ...

  4. [MySQL] Stored Procedures 【转载】

    Stored routines (procedures and functions) can be particularly useful in certain situations: When mu ...

  5. Good Practices to Write Stored Procedures in SQL Server

    Reference to: http://www.c-sharpcorner.com/UploadFile/skumaar_mca/good-practices-to-write-the-stored ...

  6. An Introduction to Stored Procedures in MySQL 5

    https://code.tutsplus.com/articles/an-introduction-to-stored-procedures-in-mysql-5--net-17843 MySQL ...

  7. Cursors in MySQL Stored Procedures

    https://www.sitepoint.com/cursors-mysql-stored-procedures/ After my previous article on Stored Proce ...

  8. MySQL Error Handling in Stored Procedures 2

    Summary: this tutorial shows you how to use MySQL handler to handle exceptions or errors encountered ...

  9. Why Stored Procedures?

    http://www.w3resource.com/mysql/mysql-procedure.php Stored procedures are fast. MySQL server takes s ...

随机推荐

  1. 金三银四季来了!Java 面试题大放送,能答对70%就去BATJTMD试试~

    摘要: 2019,相对往年我们会发现今年猎头电话少了,大部分企业年终奖缩水,加薪幅度也不如往年,选择好offer就要趁早,现在开始准备吧,刷一波Java面试题,能回答70%就去BATJTMD大胆试试~ ...

  2. 程序员、互联网从业者必读KK三大力作之《必然》总结

  3. 【适合公司业务】全网最详细的IDEA里如何正确新建【普通或者Maven】的Java web项目并发布到Tomcat上运行成功【博主强烈推荐】(类似eclipse里同一个workspace下【多个子项目】并存)(图文详解)

    不多说,直接上干货! 首先,大家要明确,IDEA.Eclipse和MyEclipse等编辑器之间的新建和运行手法是不一样的. 如果是在Myeclipse里,则是File -> new -> ...

  4. Kotlin 最佳实践

    为什么写此文 Kotlin很烦,Gralde很烦,还都是升级狂,加一块更烦.几个月不接触Kotlin,再次上手时便一片迷茫.所以记录此文,以便再次上手时查阅. 使用Gradle创建Kotlin项目 m ...

  5. Kafka项目实战-用户日志上报实时统计之编码实践

    1.概述 本课程的视频教程地址:<Kafka实战项目之编码实践>  该课程我以用户实时上报日志案例为基础,带着大家去完成各个KPI的编码工作,实现生产模块.消费模块,数据持久化,以及应用调 ...

  6. Java并发编程笔记之ConcurrentLinkedQueue源码探究

    JDK 中基于链表的非阻塞无界队列 ConcurrentLinkedQueue 原理剖析,ConcurrentLinkedQueue 内部是如何使用 CAS 非阻塞算法来保证多线程下入队出队操作的线程 ...

  7. Windows10安装Docker

    一.Docker下载安装 一般情况下,我们可以从Docker官网docker下载安装文件,但是官方网站由于众所周知的原因,不是访问慢,就是下载慢.下载docker安装包动不动就要个把小时,真是极大的影 ...

  8. [PHP]算法-最大子数组问题思路

    最大子数组问题,股票价格示例: 1.在最高价格开始向左寻找之前的最低价格 2.在最低价格开始向右寻找之后的最高价格 3.暴力求解法,尝试每队可能的买进和卖出组合,保证卖出在买进之后 key buy s ...

  9. 重定向,/dev/null, 1>, 2>什么意思?

    文件描述符我们常见的就是系统预留的0,1和2这三个,他们的意义分别有如下对应关系: 0 —— stdin(标准输入) 1 —— stdout (标准输出) 2 —— stderr (标准错误) 其中, ...

  10. HTML--Canvas基础入门

    一 HTML5画布基本介绍 1.HTML5专门为画布功能提供的标签:<canvas>,所以画布相关的功能都是基于这个标签来完成的; <canvas id="canvas&q ...