Category: Indexes
-
NonClustered Index
SQL Non-Clustered Indexes The SQL Non-Clustered index is similar to the Clustered index. When defined on a column, it creates a special table which contains the copy of indexed columns along with a pointer that refers to the location of the actual data in the table. However, unlike Clustered indexes, a Non-Clustered index cannot physically sort the…
-
Clustered Index
An index in a database is a data structure that helps to improve the speed of retrieving specific data from tables and views. Data in a table is stored in the form of an unordered data structure called a “Heap”, where rows are placed without any specific order. Thus, when retrieving data from a table, the query…
-
Unique Indexes
SQL Unique Indexes The SQL Unique Index ensures that no two rows in the indexed columns of a table have the same values (no duplicate values allowed). A unique index can be created on one or more columns of a table using the CREATE UNIQUE INDEX statement in SQL. Following are the points to be noted before…
-
Show Indexes
The SQL Show Index Statement The SHOW INDEX is the basic SQL statement to retrieve the information about the indexes that have been defined on a table. However, the SHOW INDEX statement only works on MySQL RDBMS and is not a valid statement in the SQL Server. To list the indexes created on a table in SQL…
-
Drop Index
The DROP statement in SQL is used to remove or delete an existing database object such as a table, index, view, or procedure. Whenever we use DROP statement with any of the database objects, it will remove them permanently along with their associated data. And when that database object is an index, the DROP INDEX statement in SQL is…
-
Create Index
An index is an effective way to quickly retrieve data from an SQL database. It is a database object that references the data stored in a table, which significantly improves query and application performance of a database. The process of indexing in SQL is similar to that of an index in a book: it is…
-
Indexes
The SQL Indexes SQL Indexes are special lookup tables that are used to speed up the process of data retrieval. They hold pointers that refer to the data stored in a database, which makes it easier to locate the required data records in a database table. SQL Indexes work similar to the index of a book…