Tempdb--TempDB Basic
1. TempDB只能运行在Simple Recovery Model下
2. 由于TempDB不需要Recovery,因此在TempDB中发生的操作不需要REDO,因此在日志记录上有别于其他数据库。
3. 不是所有在Tempdb中的object都被记录日志。
4. Improved cahcing for tempory objects, SQL Server chaches 1 IAM Page and 1 data page with the associated query plan.First, if the same plan is exected multiple times, the tmeporary table needs to be created once there by reducing ddl contention and reduceing allocation contention.(如果存储过程中包含创建临时表,那么临时表只会在存储过程编译的时候被创建),Temp objects are only cached when none of the following conditions is violated:
1. Data definition languaged(DDL) statements that affects the table are not run after the temp table has been created, such as create index or create statistics statements.
2. named constraints are not created.
3. Temp objects is not created by using dynamic SQL, such as:sp_executesql
系统对一些临时对象进行优化以减少重复创建和删除临时对象造成的Allocation Bottleneck
Internal object: created internally by sql server to execute user command, like the temprory result set(worktable) which created by hash join.
The operation on internal objects are not logged because internal objects are created/destoryed in the scope of a single statement.
内部对象有系统创建和清理,对内部对象的操作不记录入日志。
Tempdb--TempDB Basic的更多相关文章
- SQL Server 2008性能故障排查(四)——TempDB
原文:SQL Server 2008性能故障排查(四)--TempDB 接着上一章:I/O TempDB: TempDB是一个全局数据库,存储内部和用户对象还有零食表.对象.在SQLServer操作过 ...
- 移动tempdb导致数据库服务不能启动
事情的起因是因为数据库的IO操作过大,于是新加了个硬盘,发现在执行写入操作的时候,服务器的压力依然是比较大的,于是想到了内存盘.内存盘是"魔方"系统优化提供的一个小工具,就是将内存 ...
- Tempdb总结
Tempdb 系统数据库是一个全局资源,可供连接到 SQL Server 实例的所有用户使用,并可用于保存下列各项: 显式创建的临时用户对象,例如全局或局部临时表.临时存储过程.表变量或游标. SQL ...
- Sql Server Tempdb原理-日志机制解析实践
笔者曾经在面试DBA时的一句”tempdb为什么比其他数据库快?”使得95%以上的应试者都一脸茫然.Tempdb作为Sqlserver的重要特征,一直以来大家对它可能即熟悉又陌生.熟悉是我们时时刻刻都 ...
- SQLServer临时库文件太大,迁移tempdb数据库
问题描述: 最近公司这边tempdb库文件很大,几百GB的节奏 不过安装数据库的时候,tempdb最好不要放在C盘是放在D盘其他数据盘的 如果没有放在其他盘符下面,就需要做迁移了 解决方法: 如果te ...
- SQL SERVER-修改TempDB路径
--查看tempdb文件信息 use tempdb go sp_helpfile go --修改路径 use master go Alter database tempdb modify file ( ...
- SQL Server 系统数据库
Sql Server的系统数据库分为:master.model.msdb,resouce和tempdb,这五个数据库在SQL Server中各司其职,作为研发人员,很有必要了解这几个数据库的职责,下面 ...
- SQL Server-语句类别、数据库范式、系统数据库组成(一)
前言 终于等到这一天,我要开始重新系统学习数据库了,关于数据库这块,不出意外的话,每天会定时更新一篇且内容不会包含太多,简短的内容,深入的理解,Always to review the basics. ...
- SQL 统计整个服务器上各个数据库占用的空间
create procedure [dbo].[P__SpaceUsedView]asbegin if not exists (select 0 from tempdb..sysobjects whe ...
- 人人都是 DBA(V)SQL Server 数据库文件
SQL Server 数据库安装后会包含 4 个默认系统数据库:master, model, msdb, tempdb. SELECT [name] ,database_id ,suser_sname ...
随机推荐
- ROS使用国内的DDNS服务
未测试.转载余松老师的作品 虽然RouterOS 加入了cloud功能,但最近在配置RB2011的时候发现不好使,更新域名后无法正确解析到我的IP地址,虽然在cloud的public address中 ...
- vuex语法精简(方便开发查阅)
vuex语法精简(方便开发查阅) store结构 state Getter Mutation actions vuex语法精简(方便开发查阅) 本文只是方便开发的时候快速查阅到相关语法,想看详细内容请 ...
- python之数据驱动ddt
下载ddt并安装 Pip install ddt 或者官网下载安装 http://ddt.readthedocs.io/en/latest/ https://github.com/txels/ddt ...
- Putty使用密钥登陆SSH
平时工作学习必须要使用Windows,在SSH远程连接软件里Putty算是用得比较顺手的,而且很小巧. 但是每次输入密码很麻烦,还容易输错,OpenSSH可以利用密钥来自动登陆,如此一来方便了不少.配 ...
- 原生态Vim使用快捷键
我的第一篇博客,凌晨2点加班不想睡,随便写点.本人菜鸟一个,努力学习,争取成为大神.. 第一篇写点什么东西呢,我目前是搞运维的,俗话说"工欲善其事必先利其器",Vim作为最基本的工 ...
- Nginx Linux yum安装
-- 安装>yum install nginx -y -- 查看>whereis nginx >目录>/usr/sbin/nginx 执行命令>/etc/nginx 配置 ...
- VLC接收网络串流缓冲时间的计算 (转)
原帖地址:http://blog.csdn.net/coroutines/article/details/7472743 VLC版本2.0.1 最近研究IP-STB音视频同步问题,发现方案自带的自动S ...
- javascript中defer的作用
javascript中defer的作用 <script src="../CGI-bin/delscript.js" defer></script>中的def ...
- C#格式化数字
var t1 = Profiler.GetMonoHeapSize()/div; var t2 = Profiler.GetMonoUsedSize() / div; var t3 = Profile ...
- 7.25 11figting!
TEXT 76 Start of the long march 而今迈步从头越(陈继龙编译) Nov 16th 2006 | BEIJING AND HONG KONG From The Econom ...