Updating table

28 Jul

However, approximately 1.2 million records were deleted each morning and throughout the day a new 1.2 million records were added.

In contrast, if you have invalid or out-of-date statistics, it can lead the SQL Server engine to take the wrong path to the data, and taking the wrong path means that an index scan is made when an index seek would have been appropriate or a seek is performed against the wrong index.Typically, the default sampling ratio is enough to generate good execution plans. For example, my colleagues and I once had a large table with approximately 12 million records in the table.The number of records in the table was fairly static.The massive number of queries would send SQL Server's CPU to 100% utilization.We decided to start updating the statistics using the FULLSCAN flag.