Creating Indexes

Indexes can be created either via SQL Server Management Studio using the graphical user interface (GUI) or via command line tools. SQL Server Management Studio is convenient because of its ease of use. The GUI can generate a script that you can then modify and reuse. However, I prefer to create indexes using the command line option because these scripts can be reused and modified to create other similar indexes. In addition, these scripts are an excellent way to document your database. If there is a problem with indexes and you needed to recreate them, these scripts can be used to create all indexes in the database. One way to do this is to use the GUI to create the first index, have the GUI generate a script, and then modify ...

Get Microsoft® SQL Server™ 2005 Administrator's Companion 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.