bonjour
Dans le but de préparer pour le passage d'examen 70-432 implémentation sql server 2008 j'était devant un question que j’arrive pas a trouver le bon réponse pour lui
ci joint la question
Fabrikam stores product information in the following table:
The table is queried either by ProductID, ProductName, or SKU. The application
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9 CREATE TABLE Products.Product (ProductID INT IDENTITY(1,1), ProductName VARCHAR(30) NOT NULL, SKU CHAR(8) NOT NULL, Cost MONEY NOT NULL, ListPrice MONEY NOT NULL, ShortDescription VARCHAR(200) NOT NULL, LongDescription VARCHAR(MAX) NULL, CONSTRAINT pk_product PRIMARY KEY CLUSTERED (ProductID))
displays ProductName, SKU, ListPrice, and ShortDescription. The ProductID is also
returned to facilitate any subsequent operations. Several thousand new products were
recently added and now you have performance degradation. Which index should you
implement to provide the greatest improvement in query performance?
pour cela j'ai éliminer le choix A et B Vu que les deux propositions pointent sur deux index qui ne sont pas couvert (couverture du requête demandé) mais j'arrive pas a prendre la bonne réponses sur les deux autres propositions C ET D car j'arrive pas a comprendre dans quel cas je doit utilisé le mot include
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7 A. CREATE NONCLUSTERED INDEX idx_product ON Products.Product (ProductID, ProductName, SKU) B. CREATE NONCLUSTERED INDEX idx_product ON Products.Product (ProductName) C. CREATE NONCLUSTERED INDEX idx_product ON Products.Product (ProductName) INCLUDE (SKU, ListPrice, ShortDescription, ProductID) D. CREATE NONCLUSTERED INDEX idx_product ON Products.Product (ProductName, SKU, ProductID, ListPrice, ShortDescription)
autre question SVP quel est utilité de mettre le product_id dans la proposition (c et D) malgré qu'un index cluster est déjà crée par défaut sur ce colonne vu qu'il s'agit d'un clé primaire
merci
Partager