?
Solved

Is this a covering index?

Posted on 2011-05-11
4
Medium Priority
?
317 Views
Last Modified: 2012-05-11
The following script covers all the column selected in the SELECT statement... does this mean it is a covering index?

CREATE UNIQUE NONCLUSTERED INDEX IDX_Supplier_ID_TotalProducts_GroupID ON TR1.Supplier

(
ID,TotalProducts,GroupID  
)


0
Comment
Question by:Mr_Shaw
  • 2
4 Comments
 
LVL 18

Accepted Solution

by:
sventhan earned 1000 total points
ID: 35738592
Yes it is.

or, this would also work (not tested)

CREATE UNIQUE NONCLUSTERED INDEX IDX_Supplier_ID_TotalProducts_GroupID ON TR1.Supplier

(
ID
)
include (TotalProducts,GroupID )
0
 
LVL 18

Expert Comment

by:sventhan
ID: 35738604
check this out for more information

http://www.mssqltips.com/tip.asp?tip=1078
0
 
LVL 15

Assisted Solution

by:Aaron Shilo
Aaron Shilo earned 1000 total points
ID: 35738738
yes

once all columns that are selected and all columns in your conditions are found in your index then this coalifies as a covering index.

btw : i would pay attention to "sventhan" tip since some times when you use an index that is sorted by your conditioned column and the rest of the column ar INCLODED this can prove to be a better performing index.
0
 

Author Closing Comment

by:Mr_Shaw
ID: 35739013
thanks
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
This month, Experts Exchange sat down with resident SQL expert, Jim Horn, for an in-depth look into the makings of a successful career in SQL.
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Suggested Courses

807 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question