Which code segment should you execute?

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?

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)



Leave a Reply 7

Your email address will not be published. Required fields are marked *


HR_OS_B

HR_OS_B

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.

Slazenjer_m

Slazenjer_m

…INCLUDE(Column4)

PP

PP

CREATE NONCLUSTEREDINDEX 1X1 on Schema1.Table1(Column1,Column2,Column3) INCLUDE(Column4)

pete

pete

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)