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. Thread-方法以及wait、notify简介

    Thread.sleep()1.静态方法是定义在Thread类中.2.Thread.sleep()方法用来暂停当前执行的线程,将CPU使用权释放给线程调度器,但不释放锁(也就是说如果有synchron ...

  2. 2019年2月编程语言最新排行:java稳居第一(java优势在哪里)

      近日TIOBE公布了2月编程语言排名,在意料之中java稳居第一,C和C++分别位居第二第三名. 下图是2 月编程语言排行榜 TOP20 榜单以及前 10 名编程语言长期走势图:         ...

  3. python之函数参数问题(参数为可变对象)

    今天看到一段代码,其中函数入参有一个参数为list,类似如下: def linux_monitor(pid=0,pidlist = []): pidlist.append(pid) 通过测试发现是有问 ...

  4. app测试自动化之定位元素

    app中元素定位是通过uiautomatorviewer来查看,这个是android sdk中自带的一个工具,可以在sdk家目录的tools下找到: 双击打开之后,点击第二个按钮即可把手机当前界面的元 ...

  5. js排序问题

    1.直接排序 var arr = [1,3,2,5]; function compare(a,b){ return a - b;//从小到大 return b - a;//从大到小 } console ...

  6. Spring Boot 集成 Swagger2 与配置 OAuth2.0 授权

    Spring Boot 集成 Swagger2 很简单,由于接口采用了OAuth2.0 & JWT 协议做了安全验证,使用过程中也遇到了很多小的问题,多次尝试下述配置可以正常使用. Maven ...

  7. 使用python-aiohttp爬取今日头条

    http://blog.csdn.net/u011475134/article/details/70198533 原出处 在上一篇文章<使用python-aiohttp爬取网易云音乐>中, ...

  8. kaggle-Digit Recognizer

    安装kaggle工具获取数据源(linux 环境) 采用sklearn的KNeighborsClassifier训练数据 通过K折交叉验证来选取K值是正确率更高 1.安装kaggle,获取数据源 pi ...

  9. 和我一起打造个简单搜索之SpringDataElasticSearch关键词高亮

    前面几篇文章详细讲解了 ElasticSearch 的搭建以及使用 SpringDataElasticSearch 来完成搜索查询,但是搜索一般都会有搜索关键字高亮的功能,今天我们把它给加上. 系列文 ...

  10. 自己动手实现java数据结构(一) 向量

    1.向量介绍 计算机程序主要运行在内存中,而内存在逻辑上可以被看做是连续的地址.为了充分利用这一特性,在主流的编程语言中都存在一种底层的被称为数组(Array)的数据结构与之对应.在使用数组时需要事先 ...