How to manage the TempDB in order to improve performance?

book

Article ID: 181562

calendar_today

Updated On:

Products

Management Platform (Formerly known as Notification Server)

Issue/Introduction

 

Resolution

Question
The NS uses the TempDB quite intensively, and not just for temporary table creation, but also for temporally placement of data before it is processed.  How can the TempDB be managed in such a way as to obtain good performance from it?

Answer
Monitor the TempDB for a week, and then create two files that are 75% of the maximum size it reached over that week.

Shrinking the tempdb is a bad idea, as you end up fragmenting the physical file all over the disk. It is better to allocate the file(s) once with sufficient space to grow.  

The following article provides some detailed information about how to optimise the TempDB: 
http://sqlserver2000.databases.aspfaq.com/why-is-tempdb-full-and-how-can-i-prevent-this-from-happening.html