Indexes in Sql Server
Indexes are special data structures associated with tables or views that help speed up the query. It makes the querying process fast by providing easy access to rows in data tables

An index is a schema object. It is used by the server to speed up the retrieval of rows by using a pointer. It can reduce disk I/O(input/output) by using a rapid path access method to locate data quickly. An index helps to speed up select queries and where clauses, but it slows down data input, with the update and the insert statements.
These indexes need extra space on the disk, but they allow faster search according to different frequently searched values.
CREATE INDEX
CREATE New NON UNIQUE INDEX
Creates an index on a table. Duplicate values are allowed:
CREATE UNIQUE INDEX
Creates a unique index on a table. Duplicate values are not allowed:
DROP INDEX
Rname an index
Using system stored procedure sp_rename
Disable Indexes
We can disable the indexes in SQL Server by using the ALTER INDEX statement
Enable Indexes
If we want to enable the disabled index in the SQL Server, we need to rebuild it because we cannot simply enable it.
When should indexes be created?
When a column has a wide range of values
When the column does not have a large number of null values
When single or multiple columns used together in a where or join clause
When should indexes be avoided?
When a table is small
When the columns aren't used as a query condition
When the column is constantly updated