[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1050
  • Last Modified:

TEMPDB and TempDev

The TEMPDB Database on our server has been growing at an alarming rate. It gets up to 16 Gig some days before we get a chance to shrink it.

I've been told that complex SQL Queries and Complex Joins will cause TEMPDB to grow. Is this true? And if it is, why is this the case...in other words, what would a SQL Query use TEMPDB for?

We are trying to use SQL Profiler to isolate what is causing TEMPDB to grow...is this the correct approach?

Thanks
0
ONYX
Asked:
ONYX
  • 4
1 Solution
 
arbertCommented:
Yes, this is true.  Temp tables, and large sorts will also use TEMPDB.....Using profiler should allow you to capture most statements that hit tempdb....
0
 
ONYXAuthor Commented:
I appreciate the comments and the links. That does help. If we do not use Temp Tables in our application, but we do use large sql queries with complex joins, would temp db still fill up? I did note that tempdb is use for sorts...
Thanks again.
0
 
arbertCommented:
It's possible--just depends on how large and complex things get.  SQL will also use tempdb for other things as well.  Sometimes you may not create a temp table, but SQL will in order to speed things up.  
0

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now