Skip to content

Glossary · Backend

What is a database index?

A database index is a separate data structure that lets the database find rows matching a condition without scanning the whole table, much like a book's index. It makes reads on the indexed columns much faster, at the cost of extra storage and slightly slower writes.

Source: PostgreSQL: Indexes

Why it matters

Missing indexes are one of the most common reasons an app is fast in development and slow in production, once tables hold real volumes of data.

Indexes should follow your real queries: the columns you filter, join and sort on.

Example

// in practice

Adding an index on orders (customer_id, created_at) turns a slow order-history page into a fast one.

Go deeper

Next step

Need this done properly?

Tell us what you are building. A senior engineer replies within one business day with specific, honest next steps.

First reply
Within 1 business day
Typical start
1–2 weeks
Pricing
Fixed price per phase
You own
All code and accounts