What is a database index?
Answer out loud or in your head first, then compare.
Answer
An index is an extra structure that helps the database find selected records faster. You can think of it as a table of contents that gets you to the right place without reading everything. But it doesn't replace the data or a good query.
For example, I often fetch one user's tasks sorted by time. A well-chosen index can speed up exactly that read. The price is extra space and work on writes, because the index has to be updated. An index won't speed up every query, and for a small table simply reading all of it can be cheaper. I check the execution plan and the real timing instead of adding an index on every column.
Why it matters: Important in reports, large tables and job handling.
Possible follow-ups: Why can too many indexes slow down writes?
How did it go? Be honest — “Not yet” puts the question on your review list.
Further reading
- PostgreSQL: Transaction Isolation(opens in a new tab)Docs; accessed 22.10.2026. Isolation, locks and serialization anomalies; a good basis for working with an ORM.