Set ARITHABORT Option设置为ON
MSDN注释中提到,应该总是将Set ARITHABORT Option设置为ON,原因有四:
1,如果SSMS和application client的设置不同,那么会导致application client使用不同的Query plan。
You should always set ARITHABORT to ON in your logon sessions. Setting ARITHABORT to OFF can negatively impact query optimization leading to performance issues.
The default ARITHABORT setting for SQL Server Management Studio is ON. Client applications setting ARITHABORT to OFF can receive different query plans making it difficult to troubleshoot poorly performing queries. That is, the same query can execute fast in management studio but slow in the application. When troubleshooting queries with Management Studio always match the client ARITHABORT setting.
2,如果将SET ARITHABORT 设置为OFF,当出现Arith abort时,SQL Server使用默认值替换,可能会导致异常。
如果将SET ARITHABORT 设置为false,在执行insert,delete或update命令时,如果出现数学计算错误,溢出,被0除,SQL Server会将表达式的最终结果替换为null。在逻辑表达式,如果出现arith abort,那么逻辑表达式将返回false。
During expression evaluation when SET ARITHABORT is OFF, if an INSERT, DELETE or UPDATE statement encounters an arithmetic error, overflow, divide-by-zero, or a domain error, SQL Server inserts or updates a NULL value. If the target column is not nullable, the insert or update action fails and the user receives an error.
If SET ARITHABORT is set to OFF and an abort error occurs during the evaluation of the Boolean condition of an IF statement, the FALSE branch will be executed.
3,如果将SET ARITHABORT 设置为 ON,当出现Arith abort时,SQL Server将会终止语句的执行。
If SET ARITHABORT is ON , these error conditions cause the query to terminate.
4,在创建和更新computed index(含有computed column)或 Indexed views时,必须将Set ARITHABORT 选项设置为ON
SET ARITHABORT must be ON when you are creating or changing indexes on computed columns or indexed views. If SET ARITHABORT is OFF, CREATE, UPDATE, INSERT, and DELETE statements on tables with indexes on computed columns or indexed views will fail.
SET ARITHABORT { ON | OFF }[ ; ]
Terminates a query when an overflow or divide-by-zero error occurs during query execution.
The setting of SET ARITHABORT is set at execute or run time and not at parse time.
Set ARITHABORT Option设置为ON的更多相关文章
- easyui中的option设置selected没有效果
在mvc中,使用了easyUI框架,然后我点击添加新消息的时候弹窗一个新窗口,添加信息.却发现我的select一直无法设置默认状态,jq选中,还是直接在添加一条请选择的option都没办法选中,网络上 ...
- HTML中select的option设置selected="selected"无效的解决方案
今天遇到了一个奇葩问题,写HTML时有个select控件,通过设置option的selected="selected"居然无效,但是在其他浏览器是可以的,问了一下Google大神, ...
- IDEA 的VM Option设置加快页面的加载速度
VM Option的设置: -Xms1024M -Xmx2048M -XX:PermSize=128M -XX:MaxPermSize=256M
- HTML中select的option设置selected="selected"无效的解决方式
今天遇到了一个奇葩问题,写HTML时有个select控件.通过设置option的selected="selected"竟然无效,可是在其它浏览器是能够的.问了一下Google大神, ...
- IjkPlayer播放器秒开优化以及常用Option设置
https://blog.csdn.net/shareus/article/details/78585260 ijkplayer点播和直播视频 问题 解决及优化 https://blog.csdn. ...
- Amber中的一些option设置及名词
详细请见AMBER官方文档第18章第6节(18.6) Amber16.pdf The settings can be summarized as follows: imin=1 Choose a m ...
- Fiddler在fiddler option设置还是抓不了HTTPS包解决办法
1:请在“运行”,即下面这个地方输入certmgr.msc并回车,打开证书管理. 打开后,请点击操作--查找证书,如下所示: 然后输入“fiddler”查找所有相关证书,如下所示: 可以看到,我们找到 ...
- mysql用户权限设置
1.创建新用户 通过root用户登录之后创建 >> grant all privileges on *.* to testuser@localhost identified by &quo ...
- jQuery根据文本设置select选中失效问题
$("#select_id option[text='jQuery']").attr("selected", true) 失效 text是Jquery关键字,不 ...
随机推荐
- Django之模型层-多表操作
多表操作 数据库表关系 一对多:两个表之间的关系一旦确定为一对多,必须在数据多的表中创建关联字段 多对多:两个表之间的关系一定确定为多对多,必须创建第三张表(关联表) 一对一:一旦两个表之间的关系确定 ...
- 将scrapy项目运行在pycharm中
1.在scrapy项目中创建一个py脚本,且尽量在scrapy.cfg同级目录下.我创建的是begin.py 2.配置begin.py.写上这一句就相等于一点开始,就在终端上输入了scrapy cra ...
- PHP学习-类
类属性: 在类的成员方法里面,可以用 ->(对象运算符):$this->property(其中 property 是该属性名)这种方式来访问非静态属性.静态属性则是用 ::(双冒号):se ...
- 实验吧—Web——WP之 FALSE
打开链接,点击源码按钮,我们开始分析源码: 在这源码中我们能看出 如果名字等于密码就输出:你的名字不能等于密码 如果名字的哈希值等于密码的哈希值,那么就会输出flag 这就意味着我们要上传两个值,值不 ...
- KMP算法自我理解 和 模板
字符串 abcd abc abcd abc 匹配串 cdabcd 匹配串的 next 0 0 0 0 1 2: 开始匹配 abcd abc abcd abc cd abc d a,d 匹配失 ...
- hdu6441 Find Integer (费马大定理)
#include<bits/stdc++.h> using namespace std; int main() { int T; scanf("%d",&T); ...
- 炫龙笔记本的gtx965m显卡玩游戏很卡
这是我遇到的问题,我2016年10月份这样买了一款笔记本,主要看的是性价比吧!神舟.炫龙都是性价比,所以买了炫龙笔记本 配置如下 cpu:i7 4870hq 显卡:gtx965m 内存条:16G 固态 ...
- Mybatis一(基础)
mybatis架构 1.mybatis配置 SqlMapConfig.xml,此文件作为mybatis的全局配置文件,配置了mybatis的运行环境等信息. mapper.xml文件即sql映射文件, ...
- sql表连接方式
表连接有几种? sql表连接分成外连接.内连接和交叉连接. 一.外连接 概述: 外连接包括三种,分别是左外连接.右外连接.全外连接. 对应的sql关键字:LEFT/RIGHT/FULL OUTER ...
- Modularizing your graphQL schemas
转自: https://tomasalabes.me/blog/nodejs/graphql/2018/07/11/modularizing-graphql.html Modularizing you ...