In this situation, the statistics can get stale or be inaccurate. This should be an exceptional event in most systems.SQL Server provides two basic commands to help you to maintain your statistics, sp_updatestats and UPDATE STATISTICS.So, yes, even the automatically-created statistics get updated and maintained as the data changes.
You can view some of the information about them using the system views sys.stats and sys.indexes, but the most detail is gleaned using a function, DBCC SHOW_STATISTICS. This means statistics do not require much room at all.
While you can save a little bit of space by removing unneeded statistics, the space savings are too small to ever be worthwhile .
They’re created at different points and, unless you’re creating the statistics manually yourself, they’re created slightly differently.
The statistics on an index are created with the index.
By ‘well distributed’ I mean that you’ll get a consistent view of all the available data by pulling just a sample of the data.
Most systems, most of the time, will have reasonably well distributed data.
Other than the source and type of creation, these two types of statistics are largely the same.
This is the purpose of the histogram within the statistics. Address table in Adventure Works2012: If I were doing a search for the address ‘1313 Mockingbird Lane’ then the query optimizer is going to look at the histogram to determine two things: The RANGE_HI_KEY column shows the top of a set of data within the histogram, so a search for ‘1313’ would place it within the step represented by row ten which has a RANGE_HI_KEY value of ‘137 Lancelot Dr.’ So the first question is answered.
If you need to optimise SQL Server performance, it pays to understand SQL Server Statistics.
Grant Fritchey answers some frequently-asked questions about SQL Server Statistics: the ones we somehow feel silly asking in public, and think twice about doing so.
Try as I might, I find it hard to over-emphasize the importance of statistics to SQL Server.