Gouache painting of a wooden suggestion box on a porch rail with a vermilion pencil beside it

Partition Switch in SQL Server: Move a Million Rows in a Moment

A partition switch moves a whole partition from one table to another without copying a single row. This post builds a partitioned table with a million rows, switches the January partition out and back in, and shows that only metadata changes. It lists the five errors that stop a switch, with the real message numbers, and ends with the sliding window pattern.

Read More