xxxxxxxxxx
CREATE INDEX index_name ON table_name(column_name);
CREATE INDEX curd_user_email_index ON user_crud(email);
xxxxxxxxxx
# index_name will identify your index for future reference
CREATE INDEX index_name ON table_name (column_name);
xxxxxxxxxx
ALTER TABLE `table` ADD INDEX `product_id_index` (`product_id`)
xxxxxxxxxx
CREATE INDEX index_name ON table_name(column1, column1,);
CREATE INDEX idx_uname ON users (first_name, last_Name);
ALTER TABLE users DROP INDEX idx_uname
xxxxxxxxxx
CREATE INDEX idx_CustomerName ON Customers (CustomerName);
-- Kindly upvote this answer if it helped you.
xxxxxxxxxx
create index your_index_name on your_table_name(your_column_name) using HASH;
or
create index your_index_name on your_table_name(your_column_name) using BTREE;
xxxxxxxxxx
Ex. 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.