I'm planning to create a Non-clustered columnstore index on SQL Server 2014.
But non clustered column store index is read-only and cannot perform DML operations, we need to disable before insert and enable back after insert.
What are the best possible ways to perform this task?
To enable a disabled index Click the plus sign to expand the Indexes folder. Right-click the index you want to enable and select Rebuild. In the Rebuild Indexes dialog box, verify that the correct index is in the Indexes to rebuild grid and click OK.
To disable an index, you run an ALTER INDEX command: ALTER INDEX index_name ON table_name DISABLE; You can replace the index_name with the name of your index, and the table_name with the name of the table that the index is created on.
Simply disable the index and perform a rebuild. https://msdn.microsoft.com/en-us/library/dn589806(v=sql.120).aspx
ALTER INDEX mycolumnstoreindex ON mytable DISABLE;
-- update mytable --
ALTER INDEX mycolumnstoreindex on mytable REBUILD
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With