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

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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T21:30:03+00:00 2026-05-28T21:30:03+00:00

To start off, I’m not that great with database strategies, so I don’t know

  • 0

To start off, I’m not that great with database strategies, so I don’t know really how to even approach this.

What I want to do is store some info in a database. Essentially the data is going to look like this

  • SensorNumber (int)

  • Reading (int)

  • Timestamp (Datetime?)(I just want to track down to the minute, nothing further is needed)

The only thing about this is that over a few months of tracking I’m going to have millions of rows (~5 million rows).

I really only care about searching by Timestamp and/or SensorNumber. The data in here is pretty much going to be never edited (insert once, read many times).

How should I go about building this? Is there anything special I should do other than create the table? and create the one index for SensorNumber and Temp?

  • 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-28T21:30:03+00:00Added an answer on May 28, 2026 at 9:30 pm

    Based on your comment, I would put a clustered index on (Sensor, Timestamp).

    This will always cover when you want to search for SENSOR alone, but will also cover both fields checked in combination.

    If you want to ever search for Timestamp alone, you can add a nonclustered index there as well.

    One issue you will have with this design is the need to rebuild the table since you are going to be inserting rows non-sequentially – the new rows won’t always belong at the end of the index.

    Also, please do not name a field timestamp – this is a keyword in SQL Server and can cause you all kinds of issues if you don’t delimit it everywhere.

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

Sidebar

Related Questions

First off I want to start off saying that I don't know anything about
To start off this might not be the right approach and I'm open to
Let me start off by clarifying that(before you guys dismiss me), this is not
To start off, I don't even know if I used the proper terminology. What
Let me start off by saying I know this is probably not the correct
Let me start off by saying I don't want to print only the duplicate
First, I'll start off by saying that I do not have control over the
Let me start off by saying that I am completely new with WPF (this
Let me start off by saying that I am not an expert in C.
Let me start off by stating that I know the assignment operator in C#

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.