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,因此不需要从物理意义上移动数据和日志 ...
随机推荐
- android开发,设置listview的高度无效
一般是在item的layout中设置高度 android:layout_height="100dp" 但是发现这样后无效,因此找到解决办法,如下: android:minHeigh ...
- bzoj 2751 快速幂
首先我们知道,对于所有种情况,我们可以将每一位可以放的 数的值加起来,所有位置的乘起来,等于的就是最后的答案,具体 为什么正确,可以根据乘法分配律来想一想. 那么对于所有不做要求的,快速幂直接算就行了 ...
- hdu 3572 Task Schedule 网络流
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=3572 Our geometry princess XMM has stoped her study i ...
- 【BZOJ】【2938】【POI2000】病毒
AC自动机 好题>_<(其实是一次AC有些感动) 嗯要找到无限长的一个字符串不包含任何一个模板串,就意味着在AC自动机(Trie图)上找到一个不经过任何一个危险结点的环,深搜一下就好了…… ...
- Orchard 候补神器说明
Orchard学习视频已登录百度传课: http://www.chuanke.com/3027295-124882.html 获取Orchard候补神器请加qq群432158140 ! 候补神器是一 ...
- NYOJ-244 16进制的简单运算 AC 分类: NYOJ 2014-01-17 21:11 195人阅读 评论(0) 收藏
#include<stdio.h> int main() { long x,y; char op; int t; scanf("%d ", &t); while ...
- javascript设计模式-迭代器模式(Iterator)
<!doctype html> <html lang="en"> <head> <meta charset="UTF-8&quo ...
- Unity 处理策划的 Excel
很多时候我们需要使用策划的Excel表来做游戏的静态数据配置, 而不是采用自己定义的xml或者U3D的scriptobject. 因为很多数据都是策划处理的,而策划最喜欢的就是excel,也只会用这个 ...
- Redis与Memcached的incr/decr差异对比
目前广泛使用的分布式缓存Redis和Memcached均支持对整数型Value值的增减,对应到具体命令中就是incr和decr命令. incr/decr是原子性操作(memcached 1.2.4及以 ...
- jquery mobile的学习资料
磨刀不误砍柴工!想要学的快就得有好的资源.jquery mobile只是jquery的一个插件,所以相对简单易学.只要有jquery的基础就好.如果想修改东西的话,那么需要的知识就相对较多了. 书 & ...