tempdb usage

  • Hi!

    Sometimes I have tempdb database growing very large.  Is there any approach to determine what spid contributes most to it's growth?  Or how much of space a particular spid takes in tempdb?  Any TSQL query?

    Thanks.

  • a profiler trace against tempdb will get that info. Generally sorts ( order by ) dictincts, group by, temp table creation will hit tempdb.

    tempdb use is generally quite normal, the amount depends upon your apps and again it depends if this is a performance issue, I normally put tempdb on a fast array as this seems easier then trying to get the developers to write more efficient code

    [font="Comic Sans MS"]The GrumpyOldDBA[/font]
    www.grumpyolddba.co.uk
    http://sqlblogcasts.com/blogs/grumpyolddba/

  • You might try dbcc opentran. We ran into a vendor package that was leaving open transactions in tempdb. In our case it was the log that had humungous growth rather than the data.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply