Indexes play an important role in SQL database performance. We can use them to speed up commonly run queries, so that users don’t have to sit and wait for their results to come in.
In SQL Server, indexes can be created in several different situations. For example, when we create a primary key or a UNIQUE
constraint, an index is created behind the scenes for us. However, we can also create indexes explicitly using the CREATE INDEX
statement.