SQL Server › Partitioning
How would you decide on an appropriate partitioning strategy, including the partition key and boundary values, for a very large table in a new system?
AdvancedAnswer
You would choose a partition key that aligns with how data is most commonly queried and archived, such as a date column for time series data, choose boundary values that create reasonably evenly sized partitions to avoid one enormous partition dominating the table, and plan ahead for how new partitions will be added as new data arrives over time.
-- A well planned monthly partition function for a high volume table
CREATE PARTITION FUNCTION MonthlyRange (DATE)
AS RANGE RIGHT FOR VALUES (
'2026-01-01', '2026-02-01', '2026-03-01'
);Real-world example A new high volume logging system is designed from the start with monthly partitioning on its timestamp column, anticipating rapid data growth and planning ahead for how new partitions will be added automatically each month.