What is an index and why use it?

SQL indexes, transactions and performance · Freshers

Model answer

An index is a separate data structure (usually a B-tree) that lets the database find rows without scanning the whole table, like an index in a book. It speeds up searches, joins and sorting, but uses space and slows down inserts and updates, so index the columns you filter and join on.

Learn this topic

Indexes and Faster Queries: EXPLAIN for Beginners in the course SQL for Beginners: Learn Databases Step by Step.

Sign in to add your own answer.

More questions