yochananrachamim / AzureSQL

132 stars 61 forks source link

Added statistics modification threshold rather than mods > 0 #10

Closed Mitch-Wheat closed 4 years ago

Mitch-Wheat commented 4 years ago

Doing a FULLSCAN of statistics as soon as any modifications are made is too eager. Added the condition mod_rows > sampled_rows * 0.9

yochananrachamim commented 4 years ago

I agree it is a bit eager, however lt's assume we have 10M rows in a table. and last statistics update goes with full scan, so, rows_samples = 10M this means that we need 9M modifications to update this statistics which is not good as well as we might suffer from that before the condition to run the update will be met.

any other ideas?

yochananrachamim commented 4 years ago

as of now, since we do not have a good idea about it I will mark this as closed.