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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T12:40:10+00:00 2026-05-26T12:40:10+00:00

I am on SQL Server 2008 R2 and I am currently developing a database

  • 0

I am on SQL Server 2008 R2 and I am currently developing a database structure which contains seasonal values for some products.

By seasonal I mean that those values won’t be useful after a particular date in terms of customer use. But, those values will be used for statistical results by internal stuff.

On the sales web site, we will add a feature for product search and one of my aim is to make this search as optimized as possible. But, more row inside the database table, less fast this search will become. So, I consider archiving the unused values.

I can handle auto archiving with SQL Server Jobs automatically. No problem there. But I am not sure how I should archive those values.

Best way I can come up with is that I create another table inside the same database with same columns and put them there.

Example :

My main table name is ProductPrices and there a primary key has been
defined for this database. Then, I have created another table named
ProdutcPrices_archive. I created a primary key field for this table
as well and the same columns as ProductPrices table except for
ProdutPrices primary key value. I don’t think it is useful to
archive that value (do I think correct?).

For the internal use, I consider putting two table values together
with UNION (Is that the correct way?).

This database is meant to use for long time and it should be designed with best structure. I am not sure if I miss something here for the long run.

Any advice would be appreciated.

  • 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-26T12:40:11+00:00Added an answer on May 26, 2026 at 12:40 pm

    I’d consider one of two options initially

    • Use partitioning to separate the single table into current working set and archive data.
      No need to use an archive table

    • Add validForm, ValidTo columns to implement a type 2 SCD
      Then add an indexed view for ValidTo IS NULL to get the current set of data

    I wouldn’t have 2 separate tables if all data has to be “on-line” in one database.

    This leads to a 3rd option: an entirely separate database with all data. Only “current” data stays in live. (as @Mike_Walsh’s answer explains)

    The indexed view option is easiest and works with standard edition (with NOEXPAND hint)

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

Sidebar

Related Questions

Hey, I am currently developing a vbs script, which installs SQL server 2008 +
I have a Sql Server 2008 Express database file that's currently being used by
I have Microsoft SQL Server 2008 which we host some databases on. We currently
I have a SQL Server 2008 table which contains an external user reference currently
I'm developing a web app and currently using sql server 2008 for it. But,
I'm currently working my way through the Microsoft SQL Server 2008 - Database Development
I am currently using MS SQL Server 2008. I have a stored procedure that
I'm converting an app to use SQL Server 2008 that is currently using SQLite.
I have a simple database table (SQL Server 2008 R2 Express), which has a
I'm currently researching SQL Server 2008 as a business intelligence solution, and currently looking

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.