Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8356565
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T10:13:52+00:00 2026-06-09T10:13:52+00:00

i ve got assigned a task to improve data management proces(data archivization) on couples

  • 0

i ve got assigned a task to improve data management proces(data archivization) on couples of tables
tables are like 200gb

i am reading now about table partitioning and best practices
and as far as i know now the process goes like

  • create filegroups and files
  • create partitioning function
  • partitioning scheme – (map intervals to appopriate filegroups)
  • recreate clustered index – this is the moment when table is physically moved to another files
  • profit 🙂

but cant find one information
what is going on with existing non clustered indexes at this point ?
from here : http://technet.microsoft.com/en-us/library/ms187526(v=sql.105).aspx
i have found

Although partitioned indexes can be implemented independently from their base tables, it generally makes sense to design a partitioned table and then create an index on the table. When you do this, SQL Server automatically partitions the index by using the same partition scheme and partitioning column as the table. As a result, the index is partitioned in essentially the same manner as the table. This makes the index aligned with the table.

and another one

When partitioning a unique nonclustered index, the index key must contain the partitioning column. When partitioning a nonunique, nonclustered index, SQL Server adds the partitioning column by default as a nonkey (included) column of the index to make sure the index is aligned with the base table. SQL Server does not add the partitioning column to the index if it is already present in the index.

but none of this reference my problem
do i have to create partitioning function explicitly for existing non clustered indexes which does/doesnt have partitioning column in their definition ?

lets say we have table like

table A –
col1 col2 col3

with clustered index on col1
and non clustered on col 3
on PRIMARY partition

what is going to happen with non clustered index on col3 after partitioning , is it going to be aligned with table or still resides on PRIMARY partition

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T10:13:53+00:00Added an answer on June 9, 2026 at 10:13 am

    You should align your indexes. There are two main forces pulling you into this direction:

    • fast partition switch operations require aligned indexes. When dealing with large data sets deleting obsolete data (data that has passed the required retention period) is just as important as adding new data. Partition switch operations are by far the most efficient way of deleting old data. See How to Implement an Automatic Sliding Window in a Partitioned Table

    • query processor loves aligned indexes and hates the unaligned ones. For example see Memory Limitations and Partitioned Indexes:

    For both aligned and nonaligned indexes, the memory requirement can be
    greater if SQL Server is applying degrees of parallelism to the build
    operation on a multiprocessor computer. This is because the greater
    the degrees of parallelism, the greater the memory requirement. For
    example, if SQL Server sets degrees of parallelism to 4, a nonaligned
    partitioned index with 100 partitions requires sufficient memory for
    four processors to sort 4,000 pages at the same time, or 16,000 pages.
    If the partitioned index is aligned, the memory requirement is reduced
    to four processors sorting 40 pages, or 160 (4 * 40) pages.

    In your case this implies adding the partitioning column explicitly to each non-clustered index and declare each non-clustered index on the same partition scheme as the base table (the clustered index). Do no attempt to create a different partition function/scheme for the non-clustered index. Adding the partitioning column to each index has deep repercussions in your data model, eg. you will no longer be able to declare a primary key constraint that does not contain the partitioning column (and this ripples into all the foreign key definitions referencing the partitioned table!) but this is a price you already bought into when you accepted partitioning as a solution, see How To Decide if You Should Use Table Partitioning.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've got a table, each row containing 3 <td> . Now, I assigned a
Recently I just got assigned a project to develop a web application/site that uses
I am new to Flex (got assigned to maintain an old project at work)
I have been assigned to Convert a VB.NET project to C# and I got
I am assigned to a performance-tuning-debugging-troubleshooting task. Scenario: a multi-application environment running on several
Ok just got assigned to a new project and have never dealt with Javascript
In my c++ class, we got assigned pairs. Normally I can come up with
I've got an ObservableCollection assigned to ItemsSource of a listbox. Listbox is using a
I got the error Use of unassigned local variable 'dictionary' despite I assigned the
I've got a dictionary in python which is assigned as a template variable. One

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.