How to Tell if You Need More Tempdb Files

SQL Server, TempDB
39 Comments
You may have read that you need to have more than one data file in SQL Server’s tempdb. This can happen even if you’re using blazing fast storage. If you create a lot of tiny objects in tempdb you may hit a bottleneck on special pages that SQL Server uses internally to allocate all those objects. For certain workloads, adding…
Read More

Are Table Variables as Good as Temporary Tables in SQL 2014?

There’s a couple of new features in SQL Server 2014 that provide options for how you work with temporary objects. Will inline index creation or memory optimized temporary tables forever change the way you code? Let’s take a look! Inline Index Creation SQL Server 2014 brings us a TSQL improvement called “inline specification of CLUSTERED…
Read More

Statistics Matter on Temp Tables, Too

SQL Server, TempDB
18 Comments
Temp tables are like real tables, just a little tricker. When you’re starting out writing TSQL, it’s easy to want to do all your work in a single query. You learn about derived sub-queries, CROSS APPLY statements, and common table expressions. Suddenly, each of your queries is so complex that you hardly know what you’re…
Read More

Frequently Asked Questions About TempDB

SQL Server, TempDB
42 Comments
The questions came fast and furious in one of my recent TempDB webcasts, so here’s the ones I wasn’t able to answer during the live session: Q: Virtualized OS, SAN, no dedicated LUNs, most likely scenario with no gotchas, theoretically: dump TempDB with everything else all on one virtual volume, including logs — or split…
Read More

Bob Dylan Explains TempDB (Video)

Humor, TempDB, Videos
8 Comments
How many files must a TempDB have before it’s allowed to be fast? How many table variables must a server walk down before it’s considered a table? The answer, my friend, is blowin’ in the wind, and Bob Dylan will share it with you in this 25-minute video – hopefully you can understand him.
Read More