Creating a Non-Cluster Index

  • Hi Experts,

    I need a small help in creating non cluster index on a table as we were facing a performance issue. The issue was in one of our production server I found that the CPU utilization is going high in peak till 100% and its fluctuating, so I found some queries which are utilizing the CPU resource more, So I run these queries in tuning advisor and got the recommendations to create a non-cluster index on a table but here the index need to be create on a single table but on 18 columns out of 21 in which 1 is a cluster index and 4 are non-cluster index already created.

    Please suggest me what I need to do and.

  • Some considerations, although these are general guidelines and all implemenattions should be tested against real data sets . Firstly, don't forget to maintain statistics.

    1) Check the WHERE clause , if exact matches are resturned consider a non clustered index

    2)If the result sets are smal create a non clustered index

    3)Look for distincy value groupings , not found in the clustered index

    4)Foreign key columns with joins in the clustered index

  • Thank you Jack,

    for the valuable information I will check it and see what can be changed.

    Thank you in advance.

  • 1. do you have primary key on the right column?.

    2. do you have the query which is peaking the CPU is almost irrelevant to Primary key?.

    check the above as well.

    Regards
    Durai Nagarajan

  • ksr39 (10/23/2012)


    Hi Experts,

    I need a small help in creating non cluster index on a table as we were facing a performance issue. The issue was in one of our production server I found that the CPU utilization is going high in peak till 100% and its fluctuating, so I found some queries which are utilizing the CPU resource more, So I run these queries in tuning advisor and got the recommendations to create a non-cluster index on a table but here the index need to be create on a single table but on 18 columns out of 21 in which 1 is a cluster index and 4 are non-cluster index already created.

    Please suggest me what I need to do and.

    All 18 columns are probably only required in order to make the index "covering". However, creating an index with 18 of the available 21 columns almost duplicates the table. Have a look at the execution plans of those queries and see what you really need to do. Look for the quick wins first - table scans. Then examine the join conditions and WHERE clauses, compare with the indexes you've already got.

    “Write the query the simplest way. If through testing it becomes clear that the performance is inadequate, consider alternative query forms.” - Gail Shaw

    For fast, accurate and documented assistance in answering your questions, please read this article.
    Understanding and using APPLY, (I) and (II) Paul White
    Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply