9

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?

Jay Nani
  • 105
  • 1
  • 1
  • 6

1 Answers1

16

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  
Derrick Moeller
  • 4,808
  • 2
  • 22
  • 48