Sort of. Computing statistics shouldn't generally be done after any old insert statement. Most likely the number of changes to the table is relatively small, so refreshing the statistics will just confirm that things are about the same.
The right time to do statistics is when inserts, updates, or deletes cause a sizable percentage change in your data. If you go from 100 rows to 10,000 that would certainly qualify as a big change.
Personally I prefer to collect statistics on a regular schedule (weekly, or at least monthly) and supplement the schedule with refreshes after major application changes.
Is the question can I do both without deadlocking or blocking the inserts? yes, you can. "compute statistics" is non blocking. The one thing you can't give for your heart's desire is your heart. - Lois McMaster Bujold
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.