Solved

TEMPDB and TempDev

Posted on 2004-04-28
5
1,042 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
Recently we ran in to an issue while running some SQL jobs where we were trying to process the cubes.  We got an error saying failure stating 'NT SERVICE\SQLSERVERAGENT does not have access to Analysis Services. So this is a way to automate that wit…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

622 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