Databases: indexes, replication and sharding
Choose between SQL and NoSQL for a workload, speed up queries with indexes, scale reads with replicas, and split data across shards with a sensible shard key.
Intermediate 3 · Agent builderabout 3 hours5 sections
Quick answer
Indexes speed up lookups. Replication copies a database so reads can spread across servers. Sharding splits data across databases by a key when one server is not enough.
Why it matters
The database is usually the hardest part of a system to scale and the most painful to change later. Knowing indexes, replicas and sharding lets you plan for growth and answer the database questions in every design interview.
Sign up free to read the whole lesson
The rest of this lesson: 5 parts, video lessons, the best course, practice and a quick check. It is free, takes a few seconds and needs no card.
Accounts are for learners aged 18 and over. Under 18? The quick answer and the first part of every lesson stay open: browse lessons by topic.
Related
System designIntermediate 3: Agent builderVideo lessonsIndexReplicationSharding