Database Reference
In-Depth Information
, SIZE = 256MB
, MAXSIZE = UNLIMITED
, FILEGROWTH = 256MB
);
GO
Please note that your database file path will vary depending on the details of your
particular installation.
Next, create a table and populate it with some data. As we discussed before, Integ-
ration Services works best with large tables that can be multithreaded. One good ex-
ample of this is a Sales Fact table that is partitioned by year. Listing 8-2 will provide
the T-SQL code you need to create the table and partitioning dependencies.
Listing 8-2 . Example of T-SQL Code to Create a Partitioned Table in SQL Server
USE PDW_Example;
GO
/* Create your partition function */
CREATE PARTITION FUNCTION example_yearlyDateRange_pf
(DATETIME) AS RANGE RIGHT
FOR VALUES('2013-01-01', '2014-01-01', '2015-01-01');
GO
/* Associate your partition function with a partition
scheme */
CREATE PARTITION SCHEME example_yearlyDateRange_ps
AS PARTITION example_yearlyDateRange_pf ALL TO([Primary]);
GO
/* Create a partitioned fact table to experiment with */
CREATE TABLE PDW_Example.dbo.FactSales (
orderID
INT IDENTITY(1,1)
, orderDate
DATETIME
, customerID
INT
, webID
UNIQUEIDENTIFIER DEFAULT (NEWID())
CONSTRAINT PK_FactSales
 
 
Search WWH ::




Custom Search