Solved

statistics before and after huge DEL/INS

Posted on 2016-10-06
3
24 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
3 Comments
 
LVL 28

Accepted Solution

by:
Pawan Kumar earned 250 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 14

Assisted Solution

by:Megan Brooks
Megan Brooks earned 250 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
sql query 8 51
MSSQL Speen Degradation 4 31
Is there any way to convert exponential value to number in sql server 5 55
SQL Server 2012 r2 - Varible Table 3 32
There have been several questions about Large Transaction Log Files in SQL Server 2008, and how to get rid of them when disk space has become critical. This article will explain how to disable full recovery and implement simple recovery that carries…
How to leverage one TLS certificate to encrypt Microsoft SQL traffic and Remote Desktop Services, versus creating multiple tickets for the same server.
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

828 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