CSE Roadmap

Core tier · about 3 hours · 8 parts

Part 1 of 8 · 1 min read

Why this page comes first after the choice of database

In this module you will

  • Explain what an index is and compare a full scan with an index lookup using numbers.
  • Predict whether a query will use an index, and say why a column with few distinct values makes a poor index.
  • Tell a primary, secondary, clustered and covering index apart.
  • Design a composite index with the right column order for a query that filters and sorts.
  • Count the extra writes and storage that indexes cost, and decide how many a table should have.
  • Name the special indexes for locations and for text, and the problem each solves.

Once a database is chosen, the fastest way to make it faster is usually an index. In an interview, a design is not finished until the main queries have the indexes that serve them. The numbers on this page are made up to show the idea, unless the text names a book.