I'm doing some testing on sync vs async auto statistics updates. I'd like to quickly invalidate all statistic objects (headers, density vectors, and histograms) to ensure that next time the statistic is used that it will be updated.
I'm trying to simulate an auto update of statistics, not an auto creation.
Ideally I don't want to change the row count so I've dismissed
INSERT/DELETE operations. Ideally, I don't want to change any data values either, I have considered using
UPDATE statements but I'm thinking this could take too long on some of my larger tables.
I had looked at
UPDATE STATISTICS WITH ROWCOUNT, PAGECOUNT but I don't think this is what I'm after. I was hoping there was maybe a trace flag or undocumented command that would invalidate statistics.
Is there an quick, efficient way to do what I want to achieve that I haven't considered?
I'm testing on SQL Server 2016.