SQL Server table partitioning provides a great way to manage a time-based sliding window. By mapping each time period to an individual partition, old data can be efficiently purged or archived using a nearly instantaneous switch out of an entire partition. However, there are a couple of aspects of a time-base sliding window strategy that require some thought and planning.
RANGE LEFT or RIGHT
The RANGE LEFT or RIGHT partition function specification indicates which partition includes the exact match on the partition boundary. It is especially important to consider both the RANGE specification and boundary value when the partition function data...