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. window7利用Nexus搭建maven私有服务器

    下载地址 https://www.sonatype.com/oss-thank-you-win64.zip: cmd管理员运行命令 nexus.exe/install Nexus Service:(n ...

  2. IDEA内置git功能的使用教程

    IDEA内置git功能的使用教程 IDEA git  IDEA被公认为是最好的java开发工具,除了在代码助手.代码提示.重构工具等方面有比较好的支持,还在各类版本控制工具(git.tfs.svn.g ...

  3. redis-cluster无备节点,安装脚本

    #!/bin/bash #安装gcc yum -y install gcc #安装RVM所需的程序包 yum -y install gcc-c++ patch readline readline-de ...

  4. 全网最详细的一个超级好用的命令行工具【Cmder】是什么?

    不多说,直接上干货! Cmder是什么? 一款Windows环境下非常简洁美观易用的cmd替代者,它支持了大部分的Linux命令.支持ssh连接linux,使用起来非常方便.比起cmd.powersh ...

  5. vue axios封装以及API统一管理

    在vue项目中,每次和后台交互的时候,经常用到的就是axios请求数据,它是基于promise的http库,可运行在浏览器端和node.js中.当项目越来越大的时候,接口的请求也会越来越多,怎么去管理 ...

  6. Spring Cloud Ribbon入门

    一.简介 Spring Cloud Ribbon是一个基于Http和TCP的客户端负载均衡工具,它是基于Netflix Ribbon实现的.它不像服务注册中心.配置中心.API网关那样独立部署,但是它 ...

  7. 由sql注入联想到PreparedStatement

    PreparedStatement极大地提高了安全性. 即使到目前为止,仍有一些人连基本的恶意SQL语法都不知道. String  sql  =  "select  *  from  tb_ ...

  8. 升级mac Mojave系统,git无法使用

    升级mac Mojave系统后 无法使用git,出现如下问题 xcrun: error: invalid active developer path (/Library/Developer/Comma ...

  9. JavaWeb学习 (十五)————JSP指令

    一.JSP指令简介 JSP指令(directive)是为JSP引擎而设计的,它们并不直接产生任何可见输出,而只是告诉引擎如何处理JSP页面中的其余部分. 在JSP 2.0规范中共定义了三个指令: pa ...

  10. R语言学习笔记(五)绘图(1)

      R是一个惊艳的图形构建平台,这也是R语言的强大之处.本文将分享R语言简单的绘图命令.   本文所使用的数据或者来自R语言自带的数据(mtcars)或者自行创建.   首先,让我们来看一个简单例子: ...