Database Reference
In-Depth Information
3.
The following list represents how an underlying table would be partitioned:
Partition
1
2
12
SalesDate>=
February 1, 2011 AND
SalesDatel<March 1,
2011
SalesDate<February 1,
2011
SalesDate>= December
1, 2011
Values
If no RANGE option is mentioned,
then RANGE LEFT is the default.
4. Create a partition scheme that specifies the placement of partitions of a partition
function on file groups:
CREATE PARTITION SCHEME PS_SalesRange AS PARTITION PF_SalesMonths
TO ([PRIMARY],[FEBRUARY],[MARCH],[APRIL],[MAY],[JUNE],[JULY],[AUGU
ST],[SEPTEMBER],[OCTOBER],[NOVEMBER],[DECEMBER])
5. The scheme defines the function of where to put the partition data. This step enables
the partition of the SalesHistory table based on the Date by month range.
6. Create a table or index using the defined partition scheme.
CREATE TABLE SalesHistoryPartitionedTable (
TransactionIDint PRIMARY KEY,
SalesDate DATETIME,
ProductIdint) on PS_SalesRange(ID)
These steps can be achieved using SQL Server Management studio:
Search WWH ::




Custom Search