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

  • SEARCH
  • Home
  • 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 3488730
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T11:18:23+00:00 2026-05-18T11:18:23+00:00

I am working with a big table (~100.000.000 rows) in SQL Server 2008. Frequently,

  • 0

I am working with a big table (~100.000.000 rows) in SQL Server 2008. Frequently, I need to add and remove batches of ~30.000.000 rows to and from this table. Currently, before loading a large batch into the table, I disable indexes, I insert the data, then I rebuild the index. I have measured this to be the fastest approach.

Since recently, I am considering implementing table partitioning on this table to increase speed. I will partition the table according to my batches.

My question, will it be possible to disable the index of one particular partition, and load the data into that one before enabling it again? In that case, the rest of my table will not have to suffer a complete index rebuild, and my loading can be even faster?

  • 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-05-18T11:18:24+00:00Added an answer on May 18, 2026 at 11:18 am

    Indexes are typically on the Partition Scheme. For the scenario you are talking about you can actually load up a new table with the batch (identical structure, different name) and then use the SWITCH command to add this table as a new partition into your existing table.

    I have included code that I use to perform this, you will need to modify it based on your table names:

    DECLARE @importPart int
    DECLARE @hourlyPart int
    
    SET @importPart = 2 -- always, so long as the Import table is only made up of 1 partition
    
    -- get the Hourly partition
    SELECT 
        @hourlyPart = MAX(V.boundary_id) + 1
    FROM 
        sys.partition_range_values V
    JOIN    sys.partition_functions F
        ON  V.function_id = F.function_id
        AND F.name = 'pfHourly'
    
    ALTER TABLE Import
    SWITCH PARTITION @importPart
    TO Hourly PARTITION @hourlyPart;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working on the project with relatively big DB table( 700K rows ). Mistake,
I've had a big problem in replicating a simple SQL Server 2008 R2 Express
I'm working on a big c++ project and change code from other people. During
I'm currently working with a big container that i need to iterater over an
I'm working on a table that has 3008698 rows exam_date is a DATE field.
I'm working on a big project's registration system. After successful signup, the server generates
I am working on a project where I constantly insert rows in a table
I am working on a project where I constantly insert rows in a table
I'm currently working with MS SQL 2005, and have a table that has 17
I have a view which is a big table. This table is populated from

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.