Hi,
I am on SQL 2008.
On one of our main databases, Auto Create statistics is set to True. On certain tables, we have _WA_sys statistics generated on many columns. Many of those columns are part of an index (but not the leading column). Recently we have migrated to SQL 2008 from a different database.
In many of our performance issues, my theory is, due to these _WA_sys stats, we are not getting the plan, we expect from the query.
What I want to try is, get rid of some of the _WA_sys stats and try running the queries. I tried doing,
drop statistics [my_table_name].[_WA_Sys_00000003_060DEAE8]
The command ran successfully, but when I refresh SSMS, I can still see the _WA_sys stats there. Why is that?
Do I need to set Auto create statistics to False first, before deleting these stats?
How can get rid of these stats? How can I stop generation of _WA_sys stats for certain tables? Or do I have to do that at database level?
One might say, MSSQL is creating that for a reason. I agree. But in our particular application, there are very few very huge tables and we exactly know how to use them, really :)
Thanks in advance.