4 responses

  1. Michael J Swart
    July 28, 2026

    This is a fantastic article.

    I've found it sometimes tricky to adopt partitioned tables when you're starting out with humungous unpartitioned tables.

    https://michaeljswart.com/2026/07/partitioning-a-huge-table/

    Reply

    • Aaron Bertrand
      July 31, 2026

      Indeed! For us, we kind of have to work backwards. Sooner than later, we need to inject partitioning into existing customers who have outgrown their current archiving process. But looking forward, we want to make that an internal/implementation choice for new customers – basically a checkbox for the provisioners – which may ultimately hinge on their expected volume, retention requirements, and SQL Server edition.

      Reply

  2. Mohammad
    July 30, 2026

    Hi Aaron,
    I really enjoyed your article “It’s Time to Break Up with Archive Tables” and found it incredibly insightful. However, regarding this approach, I’ve hit a specific architectural roadblock and would love your insight.

    I have a partitioned table with monthly boundaries predefined 10 years into the future on a Current filegroup. I want to moving older monthly partitions (e.g., data from 6 months ago) to an Archive filegroup using a sliding window technique.

    The typical metadata-only approach (SWITCH OUT to a staging table on Current, MERGE the boundary, SPLIT it again, and SWITCH IN from a staging table rebuilt on Archive) fails here. Because the boundary is intermediate (future partitions already exist), the SPLIT operation ignores the NEXT USED filegroup declaration and simply inherits the filegroup of the existing adjacent partition.

    Since recreating the entire partition scheme or rebuilding the whole clustered index defeats the purpose of metadata-only operations, what is your best practice for sliding an intermediate partition to a different filegroup when future boundaries are already mapped out? Is there a metadata trick to bypass this limitation, or is a physical data movement inevitable in this specific scenario?

    Thanks

    Reply

  3. Aaron Bertrand
    July 30, 2026

    Mohammad, are you trying to move data to a different filegroup but keep the partition in the same table? If so, I'm curious what you're gaining by using the archive filegroup. Is the Archive filegroup on slower storage? Typically we slide windows out so that the old data ends up in a separate table or database and can then be dropped easily when we stop needing to keep it. I'm probably missing something but I'm trying to understand the goal of switching filegroups while keeping all the data in a single table.

    In any case, if you need to move data to a different filegroup, then no, you can't do that as a metadata operation; the data has to be physically moved. If you can give a better description of your goals and an example of before and after such a switch, I may be able to provide better answers.

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Back to top