“SQL Server Indexes
A database index is similar to an index in a book it is comprised of a lookup value, and a number identifier that corresponds to the row number in a table. In SQL Server, there are two kinds of indexes clustered and non-clustered. Clustered Indexes require that the data in the table is physically sorted in the order of the index. Because the data in a table can be physically sorted only one way, there can be at most only one clustered index per table. Non clustered index do not require that data be physically sorted, so there can be more that one non-clustered index per table. In fact SQL Server allows up to 249 non-clustered indexes per table. Because data is not physically sorted, range searches using a non clustered index are not very efficient.
The command for creating an index in T-SQL is
CREATE [ UNIQUE ] [ CLUSTERED NONCLUSTERED ] INDEX index_name ON { table view } ( column [ ASC DESC ] [ ,…n ] ) [ WITH < index_option > [ ,…n] ] [ ON filegroup ] < index_option > :: = { PAD_INDEX FILLFACTOR = fillfactor IGNORE_DUP_KEY DROP_EXISTING STATISTICS_NORECOMPUTE SORT_IN_TEMPDB }
PAD_INDEX specifies the...