sql server - Why in Partition 'SWITCH' statement source & target must reside in the same filegroup? -
I understand that to switch between partitions, both of the partitions need to be in the same file group. But I can not find a suitable location
The source and target table should share the same file group. The Source and Target Table Alternate Table ... The SWITCH statement should be in the same file group, and their high-value columns should be stored in the same file group. Any relevant indexed, indexed partition, or indexed view partition should remain in the same file group. However, the file group may be different from related tables or other related indexes. In the implementation of one of my partitions: I place my archival table in the same file group, switch, then move the data to a different file group Exclude the clustered index and recreate it. I have a lot of cost! I think the old data can be moved to a different table (for example for analysis purposes) while in a separate file group (separate drive). But due to this restriction I have been mentioned as I understand the concept (data has not been physically taken). but why? > This
switch statement is effective because it essentially needs to move data Instead of just taking on-disk addresses around. Therefore, to facilitate this "move", both sets of data should be in the same file-group.
Comments
Post a Comment