Deleting and loading bulk data by splitting, merging, and switching partitions (sliding window)

Many times there is a requirement to archive or delete a large amount of data and load a large amount of new data into a large table periodically, based on the date and time column. Let's say for example, you regularly need to delete a large amount of data that belongs to the oldest quarter. At the same time, you want to load a large amount of data into an existing table. With billions of rows in a table, this operation is not trivial and can take hours. However, if you implement table partitioning based on the date and time column, you can perform this task very efficiently.

In this recipe, we will learn how to efficiently delete a large amount of ...

Get Microsoft SQL Server 2012 Performance Tuning Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.