Creating a Partition Function
A partition function identifies values within a table that will be compared to the column on which you partition the table. As mentioned previously, it is important that you know the distribution of the data and the specific range of values in the partitioning column before you create the partition function. The following query provides an example of determining the distribution of data values in the sales_big
table by year:
You can see from the results of the SELECT
statement that there are four years’ worth of data in the sales_big
table. Because the values specified in the CREATE PARTITION FUNCTION
statement are ...
Get Microsoft® SQL Server 2008 R2 Unleashed now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.