Donnie Carvajal (8/1/2013)
Is the goal to get the actual number of rows and estimated number of rows to be equal?
within the same order of magnitude or so, doesn't have to be exact.
the stats are used for deciding the best execution plan, and the optimizer uses them to produce the best plan it can in the microseconds it's allotted to do that in.
inserts/updates/deletes modify the real data, but not the statistics about the data.
Auto update of statistics requires 20% of the rows of the table + 500 more rows before SQL does it for you;
but on a big table a much smaller percentage of rows modified can adversely affect query plans;
20% of a MillionBillion Row table might not occur for a long time.
--help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!