Category: MySQL Indexes

  • Difference between MySQL Clustered and Non-Clustered Index

    The difference between clustered and non-clustered index is the most famous question in the database related interviews. Both indexes have the same physical structure and are stored as a BTREE structure in the MySQL server database. In this section, we are going to explain the most popular differences between them. Indexing in MySQL is a…

  • MySQL Clustered Index

    An index is a separate data structure that allows us to add indexes in the existing table. It enables you to improve the faster retrieval of records on a database table. It creates an entry for each value of the indexed columns. A clustered index is actually a table where the data for the rows…

  • MySQL UNIQUE INDEX

    Indexing is a process to find an unordered list into an ordered list that allows us to retrieve records faster. It creates an entry for each value that appears in the index columns. It helps in maximizing the query’s efficiency while searching on tables in MySQL. Without indexing, we need to scan the whole table to…

  • MySQL Show Indexes

    We can get the index information of a table using the Show Indexes statement. This statement can be written as: In the above syntax, we can see that if we want to get the index of a table, it requires to specify the table_name after the FROM keyword. After the successful execution of the statement, it will…

  • MySQL Drop Index

    MySQL allows a DROP INDEX statement to remove the existing index from the table. To delete an index from a table, we can use the following query: If we want to delete an index, it requires two things: The Drop Index syntax contains two optional options, which are Algorithm and Lock for reading and writing…

  • How to Create Index in MySQL

    An index is a data structure that allows us to add indexes in the existing table. It enables you to improve the faster retrieval of records on a database table. It creates an entry for each value of the indexed columns. We use it to quickly find the record without searching each row in a database table…