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 8461195
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T13:48:47+00:00 2026-06-10T13:48:47+00:00

I have some reporting activities that periodically deliver new data, my current strategy is

  • 0

I have some reporting activities that periodically deliver new data, my current strategy is to delete the old data and then insert the new, I use a range queries to move the reporting data in batches over a period of time.

My insert performance should be excellent, since all I’m doing here is appending to an ever increasing number, I’m using a datetime2(7) data type and sysdatetime() as default value.

However, I’m worried about fragmentation problems.

Old data will be the first to be written but eventually that data will get deleted and new data (that replaces this data) will get appended to the end.

My data should effectively roll into the future as it is updated.

I fully except all old data to eventually get deleted.

Do I still have to worry about fragmentation or would this do? I suspect this will have great performance but I’m still somewhat worried that SQL Server won’t be able to reclaim the deleted space.

  • 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-10T13:48:49+00:00Added an answer on June 10, 2026 at 1:48 pm

    I understand that you will insert and delete in clustered index order. This design is very reasonable. You might still get fragmentation on inserts after a while because the inserts will reuse deleted pages. There might well be anomalies like single pages not being freed or other miscellaneous pages being present in the range used for inserting. In that sense, fragmentation causes more fragmentation as a stochastic process.

    The only way to guarantee no fragmentation is to partition your data coarsely and put each partition in a new file group. This ensures that inserts are always at the end of the file (no where else to put them). Also, deletes will eventually cause an entire partition to become eligible for deletion.

    Do you have nonclustered indexes? They might get fragmented, too.

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

Sidebar

Related Questions

I am writing a reporting gem that will have some helpers to extract data
I have some arbitrary pixel data that I want to save as a PNG.
I have some data that isn't properly partitioned (for lack of a better word).
We have some SQL server reporting services reports. I didn't write then but I
I have some reports in SQL Server Reporting Services 2005 that I need to
I have created a drupal module which displays some reporting data. I would like
I have a winforms applications that does some reporting using Crystal Reports for Visual
We have some error reporting code that, when an unhandled exception occurs, we send
I have some web applications,hosted in different domains. But users are reporting that they
I have some data loaded as a np.ndarray and need to convert it to

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.