HiveBrain v1.2.0
Get Started
← Back to all entries
patternMinor

SQL Server 2012 autoupdate statistics default behaviour

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
2012sqldefaultstatisticsbehaviourserverautoupdate

Problem

I found, that since SQL Server 2008 R2 there is a trace flag 2317 available. It turns on dynamical autoupdate statistics threshold, instead of default threshold of 20%. So, it greatly improves performance on systems with high tables (from 1 billion rows), because it could take a long time to reach 20% of rows modified. More of this here: http://support.microsoft.com/kb/2754171

Secondly, I found few unofficial topics, which says, that this trace flag is turned on by default since SQL Server 2012. But I can’t find any proof of this from vendor, Microsoft.

So, the question is: does anybody know anything about any changes on autoupdate stats default behavior since SQL Server 2012? Any link to BOL or MSDN would be appreciated.

Solution

I was just about to create a table, insert a bunch of data, create some statistics and do a test. But then I remembered this excellent blog post Erin Stellato wrote over on her blog. She's done that already.

Her tests show 20% in action. You can take what she's done her and the scripts provided, test it on your environment and witness the behavior yourself.

I've not experienced, seen or read anything that indicates this traceflag, or its behavior, is on by default in SQL Server 2012. I can't point you to official articles or documentations to prove a negative, though.

You can see for yourself which traceflags are enabled, however, by running

DBCC TRACESTATUS(-1)


Biggest advice here is - Empirical evidence rules the day. Not only will you know for sure, but you'll learn a lot in the process of figuring it out.

Code Snippets

DBCC TRACESTATUS(-1)

Context

StackExchange Database Administrators Q#53901, answer score: 3

Revisions (0)

No revisions yet.