QamoosTech
DatabasesPerformanceIntermediate

Index

PronunciationIN-deks

Definition

A structure the database keeps so it can find rows quickly, like the index at the back of a book.

Where you hear it

Query optimization and migration reviews.

Examples

  • Add an index on email to speed up the login query.
  • Too many indexes slow down writes.
  • The orders table has an index on customer_id, so looking up one customer is quick.

Common mistake

Adding an index to every column. Each index costs space and makes inserts slower.

Say it at work

  • In a meeting or chatWe should check if adding an index on this foreign key helps with the slow join.
  • In an email or ticketPlease ensure that the new migration includes the required index for the status column.