Page 1 of 1

You administer a Microsoft SQL Server 2012 database named Orders. Orders contain a table named OrderShip that is defined

Posted: Mon Oct 17, 2022 4:48 pm
by answerhappygod
You administer a Microsoft SQL Server 2012 database named Orders.
Orders contain a table named OrderShip that is defined as follows:

A NULL value represents a domestic order. Ninety percent of the values in CountryCode are NULL.
Customers require a procedure that will return orders for all customers from a specified country. You create a new procedure:

Performance on this procedure is slow.
You need to alter the schema to optimize this query. Objects created must use a minimum amount of resources.
Which Transact-SQL statement should you use?
You Administer  1
You Administer 1 (29.83 KiB) Viewed 87 times
You Administer  2
You Administer 2 (32.16 KiB) Viewed 87 times
A. CREATE NONCLUSTERED INDEX IX_CountryCode ON Ordership (CountryCode) WHERE CountryCode IS NOT NULL
B. CREATE STATISTICS ST_CountryCode ON OrderShip (CountryCode) WHERE CountryCode IS NOT NULL
C. CREATE CLUSTERED INDEX IX_CountryCode ON OrderShip (CountryCode)
D. CREATE INDEX IX_CountryCode ON OrderShip (CustomerID) WHERE CountryCode IS NOT NULL