SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Auto Create/Update Statistics for TempDB


Auto Create/Update Statistics for TempDB

Author
Message
Jay Byoun
Jay Byoun
Valued Member
Valued Member (72 reputation)Valued Member (72 reputation)Valued Member (72 reputation)Valued Member (72 reputation)Valued Member (72 reputation)Valued Member (72 reputation)Valued Member (72 reputation)Valued Member (72 reputation)

Group: General Forum Members
Points: 72 Visits: 162
I'm getting inconsitent information on this..

By default these two options are ON, and for the best practice of TempDb, some say these should be turned OFF, but others say leave them ON..

My server is handling reporting (which uses loarge temp tables) and OLTP...

Any thoughts?
McSQL
McSQL
SSCrazy
SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)

Group: General Forum Members
Points: 2242 Visits: 301
As with most things in SQL Server, it's more of an art than a science.
Simple answer is, "it depends".
In most cases, where tempdb is handling relatively small objects where statistics aren't necessarily needed, then it makes sense to turn it off, as you can see a performance improvement, but from the info you mentioned above, I suspect you're going to need to leave them on.

An option in this scenario though, to help improve performance (if you have the hardware capacity to support it), is to use tempdb in RAM;

http://support.microsoft.com/kb/115050

You'll probably need some trial and error to see if some or all reports improve using both/either the tempdb in ram and auto-update/create stats, and to see whether any are impacted adversely.
GilaMonster
GilaMonster
SSC Guru
SSC Guru (416K reputation)SSC Guru (416K reputation)SSC Guru (416K reputation)SSC Guru (416K reputation)SSC Guru (416K reputation)SSC Guru (416K reputation)SSC Guru (416K reputation)SSC Guru (416K reputation)

Group: General Forum Members
Points: 416958 Visits: 47141
Honestly, I'd leave them both on unless you have a bloody good reason to turn them off and you have code that creates stats on every temp table that you create and use or unless your temp tables only every have less than about 100 rows in them.

Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass


Jay Byoun
Jay Byoun
Valued Member
Valued Member (72 reputation)Valued Member (72 reputation)Valued Member (72 reputation)Valued Member (72 reputation)Valued Member (72 reputation)Valued Member (72 reputation)Valued Member (72 reputation)Valued Member (72 reputation)

Group: General Forum Members
Points: 72 Visits: 162
I concur.. We should leave them ON unless we can prove that turning OFF will improve general performance...
Thanks for sharing your thoughts..
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum







































































































































































SQLServerCentral


Search