CSE Roadmap

Common tier · about 2 hours · 4 parts

Part 3 of 4 · 2 min read

SSDs and flash storage

No moving parts, so the random-versus-sequential gap mostly closes.

SSDs and flash storage

Think of a filing system with no drawers to physically open, where retrieving any single page costs roughly the same small amount of time, wherever it happens to be stored.

In plain words: a solid-state drive stores data in flash memory, with no moving parts and no physical head to reposition. Random access on an SSD is far closer in cost to sequential access than on a magnetic disk, though not perfectly identical, since flash still has its own internal structure and limits.

A worked example. The same 1,000-row random-order read that was slow on a magnetic disk runs dramatically faster on an SSD, since there is no physical head needing to travel anywhere.

The key lines. No SQL; again a hardware fact, not a query.

Solid-state drive (SSD), flash memory

A solid-state drive stores data electronically in flash memory, with no moving parts, closing most of the gap between random and sequential access speed compared to a magnetic disk.

Example: a workload dominated by random lookups, once painful on a magnetic disk, becomes far more practical on an SSD.

For the curious Why this still matters even on SSDs

Even though SSDs close most of the gap, databases still organize storage in fixed-size blocks, batch writes, and prefer sequential patterns where practical, partly out of habit carried over from magnetic disks, and partly because flash still has its own write-amplification costs that reward batching. The next module covers blocks directly.

Quick notes

  • A magnetic disk's physical read head makes random access measurably slower than sequential access.
  • An SSD has no moving parts, closing most of the random-versus-sequential performance gap.
  • Random access pays a repositioning cost repeatedly; sequential access pays it rarely.
  • Databases still favor block-based, batched access patterns, partly carried over from magnetic-disk habits, partly because flash has its own costs too.
  • This physical reality is the real-world reason behind many of this level's later design choices.