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. Xamarin.Android 压缩图片并上传到WebServices

    随着手机的拍照像素越来越高,导致图片赞的容量越来越大,如果上传多张图片不进行压缩.质量处理很容易出现OOM内存泄漏问题. 最近做了一个项目,向webservices上传多张照片,但是项目部署出来就会出 ...

  2. conda环境里安装pydot

    一.conda环境里安装pydot, 输入以下命令即可: conda install -c anaconda pydot 二.如果运行tensorflow,提示缺什么包,都可以在这里下载. ----- ...

  3. Unsupervised learning无监督学习

    Unsupervised learning allows us to approach problems with little or no idea what our results should ...

  4. Python:使用基于事件驱动的SAX解析XML

    SAX的特点: 是基于事件的 API 在一个比 DOM 低的级别上操作 为您提供比 DOM 更多的控制 几乎总是比 DOM 更有效率 但不幸的是,需要比 DOM 更多的工作 基于对象和基于事件的接口 ...

  5. Spring杂记BeanFactory之getBean方法

    1.(BeanFactory) getBean(beanName) 2.(AbstractBeanFactory) doGetBean 3.(AbstractBeanFactory) transfor ...

  6. Http怎么处理长连接

    http协议中有和keep alive特性,这个在http1.1中有, 可以保持浏览器和服务器之间保持着长连接,http本身是无连接的协议, 通过tcp实现数据的传输,处理长连接要注意什么时候数据服务 ...

  7. #11 Python字典

    前言 前两节介绍了Python列表和字符串的相关用法,这两种数据类型都是有序的数据类型,所以它们可以通过索引来访问内部元素.本文将记录一种无序的数据类型——字典! 一.字典与列表和字符串的区别 字典是 ...

  8. MySQL实验准备(一)--环境准备

    MySQL实验脚本准备(一) python操纵数据库的实验环境 安装pip 1.下载脚本文件 [root@db01 .vnc]# wget https://bootstrap.pypa.io/get- ...

  9. Linux C++开发学习(一)

    一.简单输出 简单的小程序 1.安装g++ sudo install g++ 2.编写c++程序,helloworld.cpp #include<iostream> using names ...

  10. R语言实战(四)—— 基本数据管理

    一.基础操作 1.根据数据信息,创建数据框 > manager <- c(1,2,3,4,5) > date <- c("10/24/08","1 ...