Solved

statistics before and after huge DEL/INS

Posted on 2016-10-06
3
25 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 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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

I have written a PowerShell script to "walk" the security structure of each SQL instance to find:         Each Login (Windows or SQL)             * Its Server Roles             * Every database to which the login is mapped             * The associated "Database User" for this …
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…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

749 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