Which TransactSQL statements should you use?

You have a table named Customers that has an XML column named CustomerDat
a. There are
currently no indexes on the table.
You use the following WHERE clause in a query:
WHERE CustomerData.exist (‘/CustomerDemographic/@Age[.>=”21″]’) = 1
You need to create indexes for the query.
Which TransactSQL
statements should you use?

You have a table named Customers that has an XML column named CustomerDat
a. There are
currently no indexes on the table.
You use the following WHERE clause in a query:
WHERE CustomerData.exist (‘/CustomerDemographic/@Age[.>=”21″]’) = 1
You need to create indexes for the query.
Which TransactSQL
statements should you use?

A.
CREATE CLUSTERED INDEX CL_IDX_Customer
ON Customers(CustomerID);

CREATE PRIMARY XML INDEX PXML_IDX_Customer
ON Customers(CustomerData);
CREATE XML INDEX SXML_IDX_Customer ON Customer(CustomerData)
USING XML INDEX PXML_IDX_Customer
FOR PATH;

B.
CREATE PRIMARY XML INDEX PXML_IDX_Customer
ON Customers(CustomerData);
CREATE XML INDEX SXML_IDX_Customer ON Customer(CustomerData)
USING XML INDEX PXML_IDX_Customer
FOR VALUE;

C.
CREATE PRIMARY XML INDEX PXML_IDX_Customer
ON Customers(CustomerData);
CREATE XML INDEX SXML_IDX_Customer ON Customer(CustomerData)
USING XML INDEX PXML_IDX_Customer
FOR PATH;

D.
CREATE CLUSTERED INDEX CL_IDX_Customer
ON Customers(CustomerID);
CREATE PRIMARY XML INDEX PXML_IDX_Customer
ON Customers(CustomerData);
CREATE XML INDEX SXML_IDX_Customer_Property ON Customer(CustomerData)
USING XML INDEX PXML_IDX_Customer
FOR VALUE;



Leave a Reply 0

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