October 23, 2012 at 10:12 pm
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.
October 23, 2012 at 11:39 pm
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
Jack Vamvas
sqlserver-dba.com
October 24, 2012 at 3:49 am
Thank you Jack,
for the valuable information I will check it and see what can be changed.
Thank you in advance.
October 24, 2012 at 4:40 am
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
October 24, 2012 at 7:23 am
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.
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