Sql-server – Do I need a partition scheme for each partitioned table

partitioningsql server

Sorry if this is a stupid question, but I'm setting up table partitioning for the first time. It will be on multiple existing tables all within the same database.

I know I need a partition function and a partition scheme, but do I need one of each for each table or a combination of 1 function and multiple partition schema or just one of each?

I'm using SQL Server 2014 Enterprise edition.

I tried Google but couldn't find the answer.

Hope someone can help.

Thanks

Alex

Best Answer

A separate partition function/scheme for each table/index provides the most flexibility and granularity but can increase complexity and redundant maintenance when boundaries are added or removed, such as when aligning or partitioning related tables.

I generally recommend a single function for all tables/indexes that are partitioned similarly and boundaries are always added/removed at the same time. You'll need separate partition schemes related to the function only if your file group mappings differ. You'll of course require separate partition functions if you need to maintain boundaries at different times.