Is it possible to refuse sql statistics?

We tried to change the set of columns from zero values ​​to zero values, which includes deleting all related objects, making changes, and re-creating related objects.

We use SQL Compare to generate scripts, but I noticed that SQL Compare does not have script statistical objects. Does this mean that it is normally discarded, and the database will work just as well as before, without them, or did Red Gate miss the trick?

+4
source share
4 answers

It is considered best practice to automatically create and automatically update statistics. Sql Server will create them if they need them. You will often see that the setup wizard generates a lot of them, and you will also see that people advise you to update statistics as part of your service plan, but this is not necessary and can actually make things worse while auto-creation and auto-update is turned on.

+2
source

If you have update statistics and automatic creation statistics, it should work as before. You can also run sp_updatestats or UPDATE STATISTICS WITH FULLSCAN after making changes

+2
source

Why are you throwing objects? It seems that the sequence should be much simpler and less destructive: give all these objects a default value, and then make the change irrelevant.

0
source

Statistics are too specific for data to be instrumental. It would be very inefficient to blindly recreate them in a dataset.

0
source

Source: https://habr.com/ru/post/1276395/


All Articles