Q&A

Q1:What are some of the differences between clustered and nonclustered indexes?
A1: The number of indexes available (1 for clustered, 249 for nonclustered) and the contents of the leaf level of the index (data for the clustered index, rows pointing to the data for the nonclustered index).
Q2:Does SQL Server give you a warning if the index being created is not useful?
A2: No. The only warning you might get is when your queries take forever.
Q3:How do you override SQL Server's choice of indexes?
A3: With optimizer hints such as SELECT ... FROM <table> (index = 1).
Q4:How do you enable the Execution Plan display in the Query Analyzer?
A4: Select Show Execution Plan from the Query menu.

Get Sams Teach Yourself Transact-SQL in 21 Days, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.