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关键字,不 ...
随机推荐
- 2017 乌鲁木齐赛区网络赛 J Our Journey of Dalian Ends 费用流
题目描述: Life is a journey, and the road we travel has twists and turns, which sometimes lead us to une ...
- Implementing a CNN for Text Classification in TensorFlow
参考: 1.Understanding Convolutional Neural Networks for NLP 2.Implementing a CNN for Text Classificati ...
- 解决cocos2dx调用removeFromParent后报错问题
原因:cocos2dx的bug 解决办法: 放到action中,前面添加一个DelayTime延迟,代码如下 this->runAction(Sequence::create(DelayTime ...
- 测试那些事儿—简述CPU的工作原理
简单介绍CPU的工作原理 1.内部架构 CPU是由晶体管组成,其根本任务就是执行指令和数据处理,对计算机来说,就是由0和1组成的序列.CPU从逻辑上可分为3个模块,分别是控制单元,运算单元和存储单元. ...
- (17)模型层 -ORM之msql 单表的增、删、改、查 及其他操作
单表操作-增.删.改.查 ret=models.User.objects.filter(id=1) #这里的结果是一个queryset对象 ret=modles.User.Objects.filte ...
- Javascript中的 “&” 和 “|” 详解
转自:https://www.jb51.net/article/104394.htm 一.前言: 在文章开始之前,先出几个题目给大家看看: var num1 = 1 & 0; console. ...
- 【BZOJ2594】【WC2006】水管局长
日……又被傻B错坑了一整天…… 原题: SC省MY市有着庞大的地下水管网络,嘟嘟是MY市的水管局长(就是管水管的啦),嘟嘟作为水管局长的工作就是:每天供水公司可能要将一定量的水从x处送往y处,嘟嘟需要 ...
- day 06Hadoop
更换虚拟机以后操作的步奏1.到每一台机器上修改ip地址 ,然后修改hosts1.5 给每台机器配置免密码登录 2.修改hadoop 的配置文件,发送到每台机器上3.启动dfs start-dfs.sh ...
- Node学习笔记2:建立HTTP服务器和客户端之间的通信
http服务器端: var http = require('http'); var server = http.createServer(); server.on('request', functio ...
- Redis源码剖析--列表t_list实现
Redis中的列表对象比较特殊,在版本3.2之前,列表底层的编码是 ziplist 和 linkedlist 实现的, 但是在版本3.2之后,重新引入了一个 quicklist 的数据结构,列表的底层 ...