MySQL: INDEXES are awesome
Bro Code Bro Code
1.84M subscribers
38,473 views
0

 Published On Nov 11, 2022

#mysql #tutorial #course

-- INDEX (BTree data structure)
-- Indexes are used to find values within a specific column more quickly
-- MySQL normally searches sequentially through a column
-- The longer the column, the more expensive the operation is
-- UPDATE takes more time, SELECT takes less time

-- Single column index
CREATE INDEX last_name_idx
ON customers (last_name);

-- Multi column index
CREATE INDEX last_name_first_name_idx
ON customers (last_name, first_name);

show more

Share/Embed