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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T20:22:59+00:00 2026-05-22T20:22:59+00:00

SQL Server, very busy table, holds activity for around 6-10K users at any time

  • 0

SQL Server, very busy table, holds activity for around 6-10K users at any time and have inserts/updates/deletes on each hit.

I didn’t use index on this table as any data written doesn’t stay more than 10 minutes.

But while watching activity monitor I’ve noticed that SQL Server suggests adding an index to that table.

I know keeping index on a table has its costs do you think I should add index?

Update about details:
SQL 2008 R2

Table

     [id] [bigint] IDENTITY(1,1) NOT NULL,
     [siteid] [int] NOT NULL,
     [last_seen] [datetime] NOT NULL,
     [ua] [varchar](250) NOT NULL,
     [ip] [varchar](15) NOT NULL,
     [t_id] [int] NOT NULL

Suggested index

ON [dbo].[onlines] ([ua],[ip],[t_id])
  • 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-22T20:23:00+00:00Added an answer on May 22, 2026 at 8:23 pm

    Having a good clustering key can actually speed up even your inserts (read Kimberly Tripp’s excellent blog post The Clustered Index Debate Continues for a great and thorough explanation, why that is so)! And from the looks of it, you have no clustering key at all.

    So I would definitely recommend adding a primary/clustering key on your id column – it’s perfectly suited for a good clustering key: narrow, static, unique, ever-increasing:

    CREATE UNIQUE CLUSTERED INDEX CIX_YourTableName
      ON dbo.YourTableName(ID)
    

    That should speed up everything – inserts, updates, deletes and select, too.

    Whether you need additional indices (and which columns to index) depends on your SELECT queries – since you didn’t really tell us anything about those, we can only guess into the blue…..

    Basically, what you need to do:

    • establish a base line – measure your performance
    • then apply an index that makes sense – include columns used in WHERE clauses and/or ORDER BY expressions
    • measure again and compare

    There’s really no magic formula to decide whether you need an index, what it is, and how much it’ll help your scenario (or how much it’ll hurt INSERT performance) – you need to measure yourself, on your database, your hardware, your environment.

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

Sidebar

Related Questions

I have a very long-running stored procedure in SQL Server 2005 that I'm trying
I have a very simple application in c# it has a Microsoft SQL Server
I have a very simple mail merge that is connected to an SQL server
This question is very similar to SQL Server 2005: T-SQL to temporarily disable a
My PHP/MS Sql Server 2005/win 2003 Application occasionally becomes very unresponsive, the memory/cpu usage
SQL Server (2005/2008) Each of the below statements have the same result. Does anyone
Sql Server Management Studio 2008 is not scripting table permissions even when I select
Here's my situation (SQL Server): I have a web application that utilizes nHibernate for
SQL Server Version 2000. We've a bunch of desktops talking to MSSQL Server. When
SQL Server 2000 Standard, Windows 2003 My coworker removed 'BUILTIN\Administrators' group from SQL Server

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.