Advanced Concepts
This section covers what a database does behind the scenes and what happens when one machine is not enough. Interviewers ask about query optimization to see whether you can read a plan, and about replication (keeping copies), sharding (splitting data) and the CAP theorem to see whether you can reason about trade-offs in a distributed system (one spread over several machines). After this section you can explain how a query is optimized, read the cost numbers of an EXPLAIN plan, name the join algorithms, contrast replication with sharding, and state the CAP theorem correctly, without the "pick any two" shortcut.
Topics in this section
- How a query is optimized
- Reading a query plan with EXPLAIN
- Join algorithms
- Replication
- Partitioning and sharding
- The CAP theorem