TempDB size

  • Hello every one,

    is there any ways out for sinking the TempDB.

  • Ok... I'm just going to go ahead and guess you meant "shrinking" TempDB... 😉

    Yes... you may shrink the "files" associated with TempDB as you would any other database. It may, however, go back to the original size when you reboot unless you change the initial size property of the files in the database.

    Generally speaking, shrinking any database is a bad idea... it leads to fragmentation of the DB and the file on the disk. Unless you've had someone with a "runaway" query that caused TempDB to grow to some crazy number, I wouldn't shrink it... it's just gonna grow again. If you really want to keep it from growing to much, find the "bad" queries that are using it so much... start with changing cursors in batch runs to setbased logic.

    Just an FYI... we boot our production server with 12GBytes reserved for TempDB. TempDB is one of the keys to all operations of the server including performance. A too small TempDB is not a good thing.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

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

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