SQL Indexes Quiz

This SQL quiz is about indexes, the main tool for making queries fast. You will decide which queries can use an index, what composite and covering indexes do, and when an index is not worth having.

Medium 10 questions ~6 minutes Pass at 80% SQLite

Choose a mode

Playing as a guest: sign in to keep your XP and streak.

Sample question

Question 1 of 10

What does a regular (B-tree) index on a column mainly speed up?

Show the answer

A. Finding rows by that column in WHERE, JOIN and ORDER BY An index is a sorted structure that lets the database jump to matching rows instead of scanning the whole table, which helps lookups, joins and sorting. It does the opposite for writes, which now have to update the index too.

What this quiz covers

  • What an index speeds up and what it costs
  • Composite indexes and the leftmost-prefix rule
  • Why functions and leading wildcards block an index
  • Covering indexes and low-cardinality columns
  • Unique indexes and CREATE INDEX syntax

Questions people ask

Do I need an account?

No. Anyone can play. Sign in to keep your XP, streak, badges and history.

Can I retake it?

Yes. Your best score is kept, and the questions and answers are shuffled each time.