Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
CHAPTER 6 CREATING INDEXES AND DATABASE DIAGRAMMING Caution Take care when building indexes. It is possible to use the same columns in the same order, thus creating the same index twice, but under two different index names. This is a waste of time and will place unnecessary overhead on SQL Server. It is unusual but I have seen it happen. However, when including key column(s) from a clustered index in a nonclustered index, because the row pointer is actually the clustered index key, SQL is smart enough not to store the underlying information twice--once in the clustered index and once in the nonclustered index--as instead it will be the clustered index pointer instead of the data that is stored in the nonclustered index, and you can explicitly define the order of the clustered index keys or key columns as they are used in the nonclustered index. There are more indexes to build, but you will take a look at these later. When an Index Does Not Exist As the amount of data in your database expands, expansion may occur in areas that are unexpected. The application originally built with your database could have been extended, so your original database design and index decisions may not still be 100% correct. When SQL Server accesses data, it uses its query optimizer to generate what is termed a query plan. A query plan is a plan of actions that SQL Server uses to perform the query you have built against the