views:

133

answers:

1

My company just provided me with SQL Server 2005 Enterprise Edition and I wanted to partition some tables with large(r) amounts of data. I have about about 5 or 6 tables which would be a good fit to partition by datetime.

There will be some queries that need 2 of these tables in the course of the same query.

I was wondering if I should use the same partition scheme for all of these tables or if I should copy the partition scheme and put different tables on each one.

Thanks for any help in advance.

+1  A: 

You should define your partition by what makes sense for your domain. i.e. if you deal primarily in year quarters, create 5 partitions (4 quarters + 1 overspill).

You should also take into account physical file placement. From the MSDN article:

The first step in partitioning tables and indexes is to define the data on which the partition is keyed. The partition key must exist as a single column in the table and must meet certain criteria. The partition function defines the data type on which the key (also known as the logical separation of data) is based. The function defines this key but not the physical placement of the data on disk. The placement of data is determined by the partition scheme. In other words, the scheme maps the data to one or more filegroups that map the data to specific file(s) and therefore disks. The scheme always uses a function to do this: if the function defines five partitions, then the scheme must use five filegroups. The filegroups do not need to be different; however, you will get better performance when you have multiple disks and, preferably, multiple CPUs. When the scheme is used with a table, you will define the column that is used as an argument for the partition function.

These two articles may be useful:

Partitioned Tables in SQL Server 2005

Partitioned Tables and Indexes in SQL Server 2005

Mitch Wheat
"A single filegroup can be used for multiple partitions but for better data management, such as for more granular backup control, you should design your partitioned tables so that only related or logically grouped data resides on the same filegroup."This is more as to what I was getting at.
geoffrobinson