Partition table by year

  • I have a field called data_date that has the date.

    I have a table with 54 million rows and would like to partition it by year.

    Can someone help me me with partitioning this table by year?

  • You have to:

    1) Create filegroups

    2) Create data files and associate them to the filegroups

    3) Create partition function (which is by year)

    4) Create partition scheme using the partition function

    5) Recreate the index(es) using the partition scheme and the "data_date" column

    Hope that helps!

  • Also to note is that partitioning is only available in the Enterprise edition of SQL Server.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply