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. 用DDD模拟案例分析

    之前我写了几篇关于DDD的介绍和一些小例子说明,我想这对于介绍DDD还是有些模糊,甚至还不知道怎么用DDD来分析设计.昨天和园友讨论也发现没有例子很难说明,所以今天我模拟了一个案例,同时这个案例也是真 ...

  2. (转)linux中nmcli命令的使用及网络配置

    原文:https://blog.51cto.com/groot/1847482 http://www.178linux.com/44076----CentOS7中nmcli网络管理及使用详解 http ...

  3. centos7 常用工具包安装

    .虚拟机上传下载组件( 支持从windows直接拖拽文件,相当好用) yum -y install lrzsz rz+文件名(上传) sz+文件名(下载) .gcc (nginx之类由c语言开发的,编 ...

  4. tf.estimator.Estimator类的用法

    官网链接:https://www.tensorflow.org/api_docs/python/tf/estimator/Estimator Estimator - 一种可极大地简化机器学习编程的高阶 ...

  5. 方便操作的命名范围scope

    <?php namespace Goods\Model; use Think\Model; class GoodsModel extends Model { protected $_scope ...

  6. 经典面试题SALES TAXES思路分析和源码分享

    题目: SALES TAXES Basic sales tax is applicable at a rate of 10% on all goods, except books, food, and ...

  7. Docker安装(Debian8)-构建简单的SpringBoot应用

    安装docker 1. 建立仓库 移除已安装的docker(docker以前被称为docker或者docker-enginer现在称为docker-ce) apt-get remove docker ...

  8. SpringBoot学习(一)—— web项目基础搭建

    首先我们在浏览器打开这个网站 https://start.spring.io/ 打开后可以看到以下页面 在这里我们可以快速搭建一个SpringBoot基础项目,填写和选择完相应的信息后,我们点击那个绿 ...

  9. Spring-IOC实现【01-XML配置方式】

    IOC概念 IoC控制反转(IoC,Inversion of Control), 是一个概念,是一种思想.控制反转就 是对对象控制权的转移,从程序代码本身反转到了外部容器.把对象的创建.初始化. 销毁 ...

  10. [CF438E] 小朋友和二叉树

    Description 给定一个整数集合 \(c\),对于每个 \(i\in[1,m]\),求有多少种不同的带点权的二叉树使得这棵树点权和为 \(i\) 并且顶点的点权全部在集合 \(c\) 中.\( ...