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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T21:17:56+00:00 2026-05-18T21:17:56+00:00

I would like to add index(s) to my table. I am looking for general

  • 0

I would like to add index(s) to my table.
I am looking for general ideas how to add more indexes to a table.
Other than the PK clustered.
I would like to know what to look for when I am doing this.
So, my example:

This table (let’s call it TASK table) is going to be the biggest table of the whole application. Expecting millions records.

IMPORTANT: massive bulk-insert is adding data in this table

table has 27 columns: (so far, and counting 😀 )

int x 9 columns = id-s

varchar x 10 columns

bit x 2 columns

datetime x 5 columns

INT COLUMNS

all of these are INT ID-s but from tables that are usually smaller than Task table (10-50 records max), example: Status table (with values like “open”, “closed”) or Priority table (with values like “important”, “not so important”, “normal”)
there is also a column like “parent-ID” (self – ID)

join: all the “small” tables have PK, the usual way … clustered

STRING COLUMNS

there is a (Company) column (string!) that is something like “5 characters long all the time” and every user will be restricted using this one. If in Task there are 15 different “Companies” the logged in user would only see one. So there’s always a filter on this one. Might be a good idea to add an index to this column?

DATE COLUMNS

I think they don’t index these … right? Or can / should be?

  • 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-18T21:17:57+00:00Added an answer on May 18, 2026 at 9:17 pm

    I wouldn’t add any indices – unless you have specific reasons to do so, e.g. performance issues.

    In order to figure out what kind of indices to add, you need to know:

    • what kind of queries are being used against your table – what are the WHERE clauses, what kind of ORDER BY are you doing?

    • how is your data distributed? Which columns are selective enough (< 2% of the data) to be useful for indexing

    • what kind of (negative) impact do additional indices have on your INSERTs and UPDATEs on the table

    • any foreign key columns should be part of an index – preferably as the first column of the index – to speed up JOINs to other tables

    And sure you can index a DATETIME column – what made you think you cannot?? If you have a lot of queries that will restrict their result set by means of a date range, it can make total sense to index a DATETIME column – maybe not by itself, but in a compound index together with other elements of your table.

    What you cannot index are columns that hold more than 900 bytes of data – anything like VARCHAR(1000) or such.

    For great in-depth and very knowledgeable background on indexing, consult the blog by Kimberly Tripp, Queen of Indexing.

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

Sidebar

Related Questions

I would like to add roots to a VirtualTreeView http://www.delphi-gems.com/index.php/controls/virtual-treeview with a thread like
In the HTML table below, I would like to add a third column that
Basically i would like to add a new column in a table entitled product
I know that a SQL Server full text index can not index more than
I have own project and i would like add for this class same as
I have a ListView and each item have a TextView. I would like add
I would like to add a GestureDetector to all views (view groups) of an
I would like to add a custom calculation method to a managed object (which
I would like to add a hash into an array using Ruby version 1.8.7:
I would like to add up the number of line changes in an SVN

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.