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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T18:21:46+00:00 2026-05-11T18:21:46+00:00

We have a table called table1 … (c1 int indentity,c2 datetime not null,c3 varchar(50)

  • 0

We have a table called table1 …

(c1 int indentity,c2 datetime not null,c3 varchar(50) not null,
   c4 varchar(50) not null,c5 int not null,c6 int ,c7 int)

on column c1 is primary key(clusterd Index)
on column c2 is index_2(Nonclusterd) 
on column c3 is index_2(Nonclusterd)
on column c4 is index_2(Nonclusterd)
on column c5 is index_2(Nonclusterd)

It contains 10 million records. We have several procedures pointing to “table1” with different search criteria:

select from table1 where c1=blah..and c2= blah.. and c3=blah..
select from table1 where c2=blah..and c3= blah.. and c4=blah..
select from table1 where c1=blah..and c3= blah.. and c5=blah..
select from table1 where c1=blah..
select from table1 where c2=blah..
select from table1 where c3=blah..
select from table1 where c4=blah..
select from table1 where c5=blah..

What is the best way to create non-clustered index apart from above, or modify existing indexes to get good index performance and reduce the execution time?

  • 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-11T18:21:46+00:00Added an answer on May 11, 2026 at 6:21 pm

    And now to actually respond…

    The trick here is that you have single-column lookups on any number of columns, as well as composite column lookups. You need to understand with what frequency the queries above are executing – for those that are run very seldom, you should probably exclude them from your indexing considerations.

    You may be better off creating single NCIX’s on each of the columns being queried. This would likely be the case if the number of rows being returned is very small, as the NCIX’s would be able to handle the “single lookup” queries as well as the composite lookups. Alternatively, you could create single-column NCIX’s in addition to covering composite indexes – again, the deciding factor being the frequency of execution and the number of results being returned.

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

Sidebar

Ask A Question

Stats

  • Questions 190k
  • Answers 190k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer :not selector: input:not([type]), input[type='text'], input[type='password'] { /* style here */… May 12, 2026 at 5:59 pm
  • Editorial Team
    Editorial Team added an answer Using templates and macros to automatically, or semi-automatically, define everything… May 12, 2026 at 5:59 pm
  • Editorial Team
    Editorial Team added an answer I can't think of another way then just simpy printing… May 12, 2026 at 5:59 pm

Related Questions

We have a table called table1 ... (c1 int indentity,c2 datetime not null,c3 varchar(50)
Table1: Everything including the kitchen sink. Dates in the wrong format (year last so
Here is the scenario 1. I have a table called items, inside the table
How to get a value from previous result row of a SELECT statement If
I'm having problems with our MSSQL database set to any of the Turkish Collations.

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.