Solved

TEMPDB and TempDev

Posted on 2004-04-28
5
1,037 Views
Last Modified: 2011-10-03
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
Comment
Question by:ONYX
  • 4
5 Comments
 
LVL 34

Expert Comment

by:arbert
ID: 10940900
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
 
LVL 34

Expert Comment

by:arbert
ID: 10940913
0
 
LVL 34

Accepted Solution

by:
arbert earned 50 total points
ID: 10940933
0
 

Author Comment

by:ONYX
ID: 10941306
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
 
LVL 34

Expert Comment

by:arbert
ID: 10945130
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

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Join & Write a Comment

Suggested Solutions

Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now