GameDatabasesIntermediateDatabase indexing and query performanceSQLindexesperformancequery plansGamePractice SQL indexing concepts with an educational game covering single-column indexes, composite indexes, leftmost prefix, covering indexes, filtering, sorting, and write overhead.SQL Index QuestDatabasesIntermediateDatabase indexing and query performance/games/sql-index-quest/
Play, get feedback, save local progress, and optionally submit a leaderboard score.
Quick answer
SQL Index Quest is a short backend practice game for Database indexing and query performance. It helps learners make realistic decisions about SQL, indexes, performance, then explains why each answer is safe, risky, or production-ready.
Choose indexes that match filters and ordering.
Apply the leftmost prefix rule for composite indexes.
Recognize when an index is low-value or creates unnecessary write overhead.
Concept explanation
SQL indexes are one of the highest-leverage backend performance tools. This game simplifies query planning so you can practice the judgment behind index selection.
Your local progress
0 XP0 games played0 completed
Progress, review history, and best scores are stored in this browser with localStorage.
Use the controls below. Feedback appears immediately, and final scores are stored locally.
Leaderboard
Top 10 submitted scores. No account required.
Loading leaderboard...
Finish the game to load your latest local score.
Learning objectives
Choose indexes that match filters and ordering.
Apply the leftmost prefix rule for composite indexes.
Recognize when an index is low-value or creates unnecessary write overhead.
How to play
Inspect the schema, row count, and query.
Pick the index that best supports filtering, sorting, and selected columns.
Read the simplified query-plan feedback.
Scoring
Best index choices earn full points.
Partially helpful indexes explain what they improve and what they miss.
Poor indexes lose points because they add write overhead without helping the query.
Backend concept notes
Indexes speed reads by keeping ordered lookup structures, but every index costs storage and write work. Backend engineers choose indexes for real query patterns, not for every column.
Composite index order matters. An index on (user_id, created_at) helps queries that start with user_id, but it does not act like a standalone created_at index for every query.
Common mistakes
Indexing a low-cardinality boolean column by itself and expecting a large speedup.
Creating composite indexes in the wrong column order.
Ignoring ORDER BY and then paying for a separate sort.
Related Backend Study Lab articles
Use the main site for deeper reading after playing.