SQL server performance - tempdb
When tempdb is used?
User objects:
- User-defined tables and indexes
- System tables and indexes
- Global temporary tables and indexes
- Local temporary tables and indexes
- Table variables
- Tables returned in table-valued functions
Internal Objects:
- Work tables for cursor or spool operations and temporary large object (LOB) storage.
- Work files for hash join or hash aggregate operations.
- Intermediate sort results for operations such as creating or rebuilding indexes (if SORT_IN_TEMPDB is specified), or certain GROUP BY, ORDER BY, or UNION queries.
Version Stores:
- Row versions that are generated by data modification transactions in a database that uses snapshot or read committed using row versioning isolation levels.
- Row versions that are generated by data modification transactions for features such as: online index operations, Multiple Active Result Sets (MARS), and AFTER triggers.
Temp db optimization:
- Set the tempdb to single recovery model. Less logs.
- Allow for tempdb files to automatically grow as required. Rule for file size increment is 2 min * the speed of IO system on which the tempdb files are located. Example: if the I/O system can initialize the database file at 50 MB/s, then auto growth increment is 50 *2 *60= 6 GB
- Preallocate the enough large disk space for tempdb files to accommodate the typical workload in the environment.
- Create a data file for each cpu, if the cpu is dual-core, consider it as 2 cpus.
- Make each file the same size. This allows for optimal proportional-fill performance.
- Put the tempdb database on disks that differ from those that are used by user databases.
Monitor the space usage:
use tempdb
go
select * from sys.dm_db_session_space_usage
select * from sys.dm_db_task_space_usage
select * from sys.dm_db_file_space_usage
http://technet.microsoft.com/en-us/library/ms345368(v=sql.105).aspx
SQL server performance - tempdb的更多相关文章
- SQL Server performance tips
Refer to: http://harriyott.com/2006/01/sql-server-performance-tips A colleague of mine has been look ...
- SQL Server中tempdb的管理
原文:SQL Server中tempdb的管理 资料来自: http://blogs.msdn.com/b/sqlserverstorageengine/archive/tags/tempdb/ ht ...
- SQL Server中TempDB管理(version store的逻辑结构)
原文:SQL Server中TempDB管理(version store的逻辑结构) 原文来自: http://blogs.msdn.com/b/sqlserverstorageengine/arch ...
- SQL Server中TempDB管理(版本存储区的一个example)
原文:SQL Server中TempDB管理(版本存储区的一个example) 原文来自: http://blogs.msdn.com/b/sqlserverstorageengine/archive ...
- 监测谁用了SQL Server的Tempdb空间
原文:监测谁用了SQL Server的Tempdb空间 转自:http://blogs.msdn.com/b/apgcdsd/archive/2011/02/11/sql-server-tempdb. ...
- SQL Server中tempdb的management
对<SQL Server中tempdb的management>的一些更正和补充 对<SQL Server中tempdb的management>的一些更正和补充 前几天看了这 ...
- [转]如何监测谁用了SQL Server的Tempdb空间
Tempdb 系统数据库是一个全局资源,供连接到 SQL Server 实例的所有用户使用.在现在的SQL Server里,其使用频率可能会超过用户的想象.如果Tempdb空间耗尽,许多操作将不能完成 ...
- 对《SQL Server中tempdb的management》的一些更正和补充
对<SQL Server中tempdb的management>的一些更正和补充 前几天看了这篇文章:SQL Server中tempdb的management 发现里面有些内容不是很准确 文 ...
- sql server转移tempdb数据库的物理存放位置
转移前将原来的文件备份一下 将 tempdb 从其在磁盘上的当前位置移动到其他磁盘位置.由于每次启动 MSSQLSERVER 服务时都会重新创建 tempdb,因此不需要从物理意义上移动数据和日志 ...
随机推荐
- Eclipse的python插件安装
网上找了一些资料都没有成功~~然后自己装的过程中编辑记录了一些 当然博客园里也有人用这一种方法也可以参考IBM中的 http://www.cnblogs.com/visec479/p/4139882. ...
- android开发 WriteUTF与readUTF 原理
今晚上写代码玩,用到java.io.RandomAccessFile.writeUTF(String)函数,而文件默认保存为gbk,显然是乱码.突然想起来去看看存储编码规则,就去找了些文章了解writ ...
- 转载------------------关于android的一些技巧
Android eclipse中程序调试 一:断点调试 用eclipse开发android程序的时,跟VS一样是可以断点单步调试的.步骤如下.1 设置断点:在编码窗体的左边框上用鼠标双击,或者右键点击 ...
- 在C#中创建word文档
在下面文档中 首先引用word组件:Microsoft.Office.Interop.Word 在头文件中写上 using Word = Microsoft.Office.Interop.Word; ...
- idea新建项目完整过程
参看下面博客 http://www.cnblogs.com/cnjava/archive/2013/01/29/2881654.html 突然,感觉idea其实挺麻烦的: 一.junit test做起 ...
- __int64 与long long 的区别 分类: Brush Mode 2014-08-14 10:22 64人阅读 评论(0) 收藏
//为了和DSP兼容,TSint64和TUint64设置成TSint40和TUint40一样的数 //结果VC中还是认为是32位的,显然不合适 //typedef signed long int ...
- Maven安装和配置,eclipse创建Maven项目
提示:使用Maven需要先安装jdk. 下载安装Maven 一.下载最新版的Maven,下载地址:http://maven.apache.org/download.cgi 二.将Maven下载到E:\ ...
- ubuntu搭建lnmp
http://wiki.ubuntu.org.cn/Nginx#.E5.AE.89.E8.A3.85Php.E5.92.8Cmysql
- [百度空间] [转] 四元数(Quaternions)
转:四元数(Quaternions) 好吧,我必须承认到目前为止我还没有完全理解四元数,我一度把四元数理解为轴.角表示的4维向量,也就在下午我才从和同事的争辩中理解了四元数不完全是角.轴这么简单,为此 ...
- Sencha Touch xtype对应的class
Sencha Touch 2的有效xtype xtype Class ----------------- --------------------- actionsheet Ext.ActionShe ...