A database index is a data structure that improves the speed of operations in a table. MySQL indexing is used to avoid full table scan.
An index is a data structure (most commonly a B- tree) that stores the values for a specific column in a table. An index is created on a column of a table.
B- trees are the most commonly used data structures for indexes. The reason B- trees are the most popular data structure for indexes is due to the fact that they are time efficient – because look-ups, deletions, and insertions can all be done in logarithmic time. And, another major reason B- trees are more commonly used is because the data that is stored inside the B- tree can be sorted.
Here’s what the actual SQL would look like to create an index on the Employee_Name column from our example earlier:
CREATE INDEX name_index ON Employee (Employee_Name)
For more Read on :