1create index your_index_name on your_table_name(your_column_name) using HASH;
2or
3create index your_index_name on your_table_name(your_column_name) using BTREE;
1Ex. Explain select * from user where name = ‘kinjal’ #here explain is used for finding that how much time it takes to find name, how much rows in search.
1Indexes are used to find rows with specific column values quickly. Without an index, MySQL must begin with the first row and then read through the entire table to find the relevant rows. The larger the table, the more this costs.
1 SELECT * FROM table1 USE INDEX (col1_index,col2_index)
2 WHERE col1=1 AND col2=2 AND col3=3;