What is Database Index?
A database index is a lookup structure on one or more columns that lets the database find matching rows without reading the whole table.
Database Index explained
Think of the index in a book: instead of reading every page to find a topic, you look it up. Indexing the column you filter or join on, such as customer_id, can make queries much faster on large tables.
Indexes cost storage and slow down writes slightly, so they are added where queries need them rather than everywhere.
Example
An index on orders(order_date) lets a query for last week's orders skip most of the table.