?
Solved

statistics before and after huge DEL/INS

Posted on 2016-10-06
3
Medium Priority
?
30 Views
Last Modified: 2016-10-31
is there a good procedure recommended to do after a BIG DEL/INS operation to make sure stats are not out of hand?
0
Comment
Question by:25112
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 29

Accepted Solution

by:
Pawan Kumar earned 1000 total points
ID: 41831736
In that case you should update your stats on daily basis (Only on the tables it is needed)  in the night when users are office.

Update Statistics tableName...
0
 
LVL 16

Assisted Solution

by:Megan Brooks
Megan Brooks earned 1000 total points
ID: 41832537
If you have very large tables, you should turn on trace flag 2731 (after testing), if you have SQL Server 2008 R2 SP1 or later.  SQL Server 2016 (finally) turns it on by default. If all you have is a one-time delete/insert, or an earlier version of SQL Server, you can update stats as noted.

I would do some research before setting up a job to update stats daily. If you have idle time during off hours for running maintenance tasks, and testing shows that updating stats daily works better than not doing it, it might be OK.

Personally, in either case (one-time or scheduled), I would do stats freshness tests first to see if stats updates were likely to be an issue, and how often they needed to be updated, and to confirm that freshness actually improves afterward. If you set up a daily job and forget about it, and it isn't really necessary, and if the server workload changes, you could be in for problems.
0
 
LVL 5

Author Comment

by:25112
ID: 41848881
thanks for both angels of inputs..

can you suggest what is a stats freshness test and what (all) does it involve?
0

Featured Post

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

After restoring a Microsoft SQL Server database (.bak) from backup or attaching .mdf file, you may run into "Error '15023' User or role already exists in the current database" when you use the "User Mapping" SQL Management Studio functionality to al…
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

800 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question