6

I have a rowstore table which contains ~10 billion records. The table is partitioned on an INT field and has about 1,400 active partitions. I also have a clustered columnstore table built on the same Partition Scheme / Function. Can I switch an active partition from the Rowstore table to the Columnstore table?

ALTER TABLE [dbo].[RowstoreTable] SWITCH PARTITION 741 TO [dbo].[ColumnstoreTable] PARTITION 741

This database resides on SQL Server 2014 Enterprise Edition.

8

No, this is not possible. ALTER TABLE... SWITCH is a metadata operation and both tables need to have identical schemas. There's no such thing as a partitioned table that has some columnstore partitions and some rowstore partitions.

The best you can do is switch the rowstore partition out, build a clustered columnstore index on the switched out table, and then switch that table into the columnstore table.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.