SQL Server – TempDB How many files?

As explained by Paul Randal. Scripts by Paul Randal.

Step 1: Make sure this information isn’t out of date!

Step 2: Detect if your server has a problem with tempDB contention by running a script.

Step 3: If you have contention, then…. If you have less than equal to 8 cores, ensure you have as many tempdb files as you have cores. If you have more than 8 cores, follow a growth formulae, and test the impact of the change (see Paul’s blog above). Note: You do not need more log files.

Step 4:  Make sure all tempdb files are the same size.

Step 5: Make sure your tempdb files are sized to your typical operational workload, as they will shrink when the server resets.

 

Leave a comment