Interview Bootcamp
Vote

0% completed

What are Indexes?

There are two ways for a database to find a row: read every row in the table and check each one, or look the answer up in a small sorted structure built for that purpose (an index). The first way is simple and slow. The second way is what keeps real systems fast.

An index is a data structure that stores the values of one or more columns in sorted order, along with a pointer to the full row. Think of it as a table of contents for your data. You do not read the whole book to find one chapter. You read the table of contents, and it tells you which page to turn to.

.....

.....

.....

Like the course? Get enrolled and start learning!
Yulian Stefanov

Yulian Stefanov

· 4 months ago

It would be useful if you could also cover a point of how performance is affected by indexes on columns that are meant to be used in searchbars. Since indexes resemble lookups that rely on exact match, a partial match would degrade the performance, no?

Show 2 replies