The short version

An index is a separate data structure that helps a database find rows without reading every row in a table. It is a trade: more storage and slightly slower writes in exchange for much faster reads.

Start with the question

The best index is shaped by the questions your application actually asks. Look at your slow queries, understand their filters and sort order, then make the access pattern explicit.

The useful constraint

Indexes are most valuable when they support a selective, repeatable path through the data. They are not a magic “make it faster” button; they are part of the design of the system.