Reputation: 1116
I need to disable auto indexing in a SQL Server database, basically I want to control when the indexing occurs (for example, at night).
I don't want to disable the indexes by table, for instance like:
ALTER INDEX [IX_NAME] ON SCHEMA.TABLE DISABLE
Does anyone know how to achieve this?
Upvotes: 1
Views: 2297
Reputation: 51309
You can disable an index as outlined here, but then it won't be used to query data until you re-enable it. You can't disable an index and still have it used in queries- such a thing could result in incorrect or inconsistent results.
Upvotes: 2