关于Natively Compiled Stored Procedures的优化
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的优化的更多相关文章
- SQL Server ->> Natively Compiled Stored Procedures(本地编译存储过程)
Comming soon! 参考: Natively Compiled Stored Procedures
- 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 ...
- 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 ...
- [MySQL] Stored Procedures 【转载】
Stored routines (procedures and functions) can be particularly useful in certain situations: When mu ...
- 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 ...
- An Introduction to Stored Procedures in MySQL 5
https://code.tutsplus.com/articles/an-introduction-to-stored-procedures-in-mysql-5--net-17843 MySQL ...
- Cursors in MySQL Stored Procedures
https://www.sitepoint.com/cursors-mysql-stored-procedures/ After my previous article on Stored Proce ...
- MySQL Error Handling in Stored Procedures 2
Summary: this tutorial shows you how to use MySQL handler to handle exceptions or errors encountered ...
- Why Stored Procedures?
http://www.w3resource.com/mysql/mysql-procedure.php Stored procedures are fast. MySQL server takes s ...
随机推荐
- [视频]K8飞刀 HackerIE自动检测网站注入教程
[视频]K8飞刀 HackerIE自动检测网站注入教程 https://pan.baidu.com/s/1c08rihi
- __getattr__()
定义了__getattr__(),当访问object不存在的属性时会调用该方法 不定义访问不存在的属性时会报 AttributeError eg: class Cat(object): def __i ...
- Nginx+Keepalived 实现高可用
Keepalived 是一个高性能的 服务器高可用 或 热备解决方案,Keepalived主要来防止服务器单点故障的问题,可以通过其与Nginx的配合来实现web服务端的高可用. Keepalived ...
- php 对中文字符串的处理- 随机取出指定个数的汉字
mb_internal_encoding("UTF-8"); $str="们以我到他会作时要动国产的一是工就年阶义发成部民可出能方进在岭骗休借了不和有大这主中人上为来分生 ...
- 基于 CGLIB 库的动态代理机制
之前的文章我们详细的介绍了 JDK 自身的 API 所提供的一种动态代理的实现,它的实现相对而言是简单的,但是却有一个非常致命性的缺陷,就是只能为接口中的方法完成代理,而委托类自己的方法或者父类中的方 ...
- 设计模式教程(Design Patterns Tutorial)笔记之一 创建型模式(Creational Patterns)
目录 · 概述 · Factory · What is the Factory Design Pattern? · Sample Code · Abstract Factory · What is t ...
- [Mysql]——通过例子理解事务的4种隔离级别
SQL标准定义了4种隔离级别,包括了一些具体规则,用来限定事务内外的哪些改变是可见的,哪些是不可见的. 低级别的隔离级一般支持更高的并发处理,并拥有更低的系统开销. 首先,我们使用 test 数据库, ...
- 安装MongDB
MongoDB:非关系型的文档型数据库. 下载 安装 bin拷贝到d:/mongodb/bin 新建文件夹: d:/mongodb/var 新建文件 d:/mongodb/logs.txt 打开cmd ...
- C# 语句 分支语句 switch----case----.
第二种分支语句 switch..case. switch(一个变量){ case 值:要执行的代码段;break; case 值:要执行的代码段;break; ... ... ... default ...
- [PHP] 算法-二叉树的子结构判断的PHP实现
输入两棵二叉树A,B,判断B是不是A的子结构.(ps:我们约定空树不是任意一个树的子结构) 1.子树的意思是包含了一个节点,就得包含这个节点下的所有节点,两棵树同时到底 2.子结构可以是A树的任意一部 ...