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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T05:35:53+00:00 2026-06-14T05:35:53+00:00

Background Microsoft SQL Server 2008 R2 Table with ~100k records per day Most queries

  • 0

Background

  • Microsoft SQL Server 2008 R2
  • Table with ~100k records per day
  • Most queries querying this table filter by the stated column

Problem

So, to add a little performance improvement to the database, an option is add an index on a date column, but instead of storing the date as a date type, store it as an integer using the following format:

ddMMyyyy
**Edit: Changed the format to yyyyMMdd after looking at comments**

Question

  1. Do you think this is a good idea?
  2. Would you gain any improvements by doing this?
  3. Any possible drawbacks?

We are still in the design phase so we still have time to change this if we feel like it.

We expect to have a lot of queries doing filters by this column, but IMO this wont give any performance improvements, it would be the same to have a Date column without specifying the time in it.

  • 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-14T05:35:54+00:00Added an answer on June 14, 2026 at 5:35 am

    If you are trying to improve performance on the table, adding an additional column is a suspicious way to begin.

    First, if the table already has a date column, then use that. Date is 4-bytes, so it is the same size as an integer. More importantly, it gives you all sorts of date functionality built into the database — getting the month name, ordering by dates, calculating the number of days between dates, and so on.

    Building an index is one approach for improving performance. I would also suggest that you look into partitioning the table. You probably don’t need to break up the table by day, but breaking it up by month would produce reasonably sized partitions (about 3 million rows).

    In fact, if the querying is all on recent data, then I might suggest that you create a history table, which can be queried at leasure. Then keep the most recent data in “current” table. You can have a process that runs every day to remove the oldest day of data from the current data and to put the rows in the history table.

    In any case, as the comments suggest, the format ddMmyyyy is an unreasonable format. It works for equality, but not for between or order by.

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

Sidebar

Related Questions

Background: My organization uses Microsoft .Net (3.5) with SQL Server 2005 as back end.
Background info: I'm coding with C#, using Microsoft SQL Server for databases. I didn't
To have a gradient background on an element I do something like this: .css('filter','progid:DXImageTransform.Microsoft.gradient(startColorstr=\'#FFFFFF\',
I have this css style: background:#000; background:rgba(0,0,0,0.7); background: transparent; -ms-filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#B2000000,endColorstr=#B2000000); /* IE8 */
Background info: I'm using Microsoft Visual C# 2010 for this project. I want to
Basic Question - I have installed SQL Server Express 2008 with integrated SP1 .
In the SQL Server Full-Text Indexing scheme i want to know if a table
Code: body { background-attachment: fixed !important; filter: progid:DXImageTransform.Microsoft.Gradient(gradientType=0,startColorStr=#000000,endColorStr=#3d3c3c); } Gradient does not stay fixed
.horizontalTabGradient { filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#edeff4', endColorstr='#ffffff', iOrientation=1); /* for IE */ background: -webkit-gradient(linear, left top,
I'm exploring full text index searching using SQL Server 2008 and encounter two sets

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.