You review a query that runs slowly. The query accesses data in a table named
Schema1.Table1.
The following is the relevant portion of the execution plan for the query:
You need to create the missing index.
Which code segment should you execute?
A.
CREATE NONCLUSTEREDINDEX 1X1 on Schema1 –
Table1(Column1)INCLUDE(Column4) WHERE Cclumn2 <> Column3
B.
CREATE NONCLUSTEREDINDEX 1X1 on Schema1.Table1(Column1)
C.
CREATE NONCLUSTEREDINDEX 1X1 on Schema1.Table1(Column1,Column2,
Column3) INCLUDE(Column1)
D.
CREATE NONCLUSTEREDINDEX 1X1 on
chema1.Table1(Column1)INCLUDE(Column4)
Correct answer should be C, all key columns, both from EQUALITY and INEQUALITY tag should be in index, and non key column should be in include.
…INCLUDE(Column4)
C
CREATE NONCLUSTEREDINDEX 1X1 on Schema1.Table1(Column1,Column2,Column3) INCLUDE(Column4)
all are right. The answer is C; BUT the answer should be
CREATE NONCLUSTEREDINDEX 1X1 on Schema1.Table1(Column1,Column2,Column3) INCLUDE(Column4)
not
CREATE NONCLUSTEREDINDEX 1X1 on Schema1.Table1(Column1,Column2,
Column3) INCLUDE(Column1)
https://technet.microsoft.com/en-us/library/ms345405(v=sql.105).aspx
C