Book Image

Getting Started with SQL Server 2014 Administration

By : Gethyn Ellis
Book Image

Getting Started with SQL Server 2014 Administration

By: Gethyn Ellis

Overview of this book

Table of Contents (13 chapters)
Getting Started with SQL Server 2014 Administration
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Statistics


One of the problems while updating statistics on large tables in SQL Server is that the entire table has to be scanned, for example, while using the WITH FULLSCAN option to scan the entire table, even if only recent data has changed. This is also true when using partitioning. Even if only the newest partition has changed since the last time, the statistics are updated. Updating the statistics again requires a scan of the entire table, not just the current partition. This scan option includes all the partitions that didn't change. You can now update statistics incrementally with the introduction of SQL Server 2014, which can provide help with this problem.

The CREATE STATISTICS option and related statistic statements now allow for individual partition statistics to be created and updated using the INCREMENTAL option. Other related statements that allow or report incremental statistics include: UPDATE STATISTICS, sp_createstats, CREATE INDEX, ALTER INDEX, ALTER DATABASE SET, DATABASEPROPERTYEX...