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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T11:47:51+00:00 2026-05-30T11:47:51+00:00

We are using SQL Server 2008 Enterprise version. We have a large table FooTable

  • 0

We are using SQL Server 2008 Enterprise version. We have a large table FooTable (billions of rows).

FooTable Columns: site:varchar(7), device:varchar(7), time(datetime), value(float)

Every day we insert millions of new rows.

We created a clustered index for site, device and time (in order).

As we can see, site and device are relatively constant, but time will keep changing as time goes by.

The queries executed against this table would be:

  1. INSERT INTO FooTable SELECT * FROM #BULK_INSERTED_TEMP_TABLE

  2. SELECT value FROM FooTable WHERE site = 'fooSite' AND device = 'fooDevice' AND time = 'fooTime'

  3. SELECT SUM(value) FROM FooTable WHERE site = 'fooSite' AND device = 'fooDevice' AND time > 'startTime' AND time <= 'endTime'

What is the best clustered index design?

  • 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-30T11:47:52+00:00Added an answer on May 30, 2026 at 11:47 am

    There’s no one true answer for the best clustered index design. In general, I look at clustered indexes two ways. First, they store the data, so you need to consider them from the data storage aspect. Are you creating a cluster that is likely to be constantly splitting pages as new data arrives? Second, because they store data, you should consider the queries that are going to be used most frequently to retrieve the data. Will those queries be able to use the clustered index to get at the data?

    Knowing next to nothing about your set up, do you have an optimal choice for clustered index? I would say possibly not. What you’ve defined is a valid primary key candidate, but the structure you’ve outlined, with the two columns that are going to group the data into a particular structure combined with an ever increasing piece of data which will cause insertions all over the place within the distribution of the first two columns suggests you’re going to be looking at lots of page splits. That may or may not be an issue, but it’s something you’ll need to monitor.

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

Sidebar

Related Questions

I am using SQL Server 2008 Enterprise. I have a table and one of
I am using SQL Server 2008 Enterprise. I have a table called Foo and
I am using SQL Server 2008 Enterprise version. I want to know if I
I am using SQL Server 2008 Enterprise. I have created a very simple test
I am using SQL Server 2008 Enterprise. I have tried that if I set
I am using SQL Server 2008 Enterprise. I have yearly customer data from 2000
Using SQL Server 2008, I have abc and xyz table abc abc_id | xyz_id1
I am using SQL Server 2008. I have a table (TBL_FILE) that stores user
i am using sql server 2008 procedure, i have total rows divide by per
I am using .Net 2.0 + SQL Server 2005 Enterprise + VSTS 2008 +

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.