CSE Roadmap

Common tier · about 2 hours · 4 parts

Part 2 of 4 · 1 min read

Magnetic disks and seek time

Why moving a physical read head costs real time, and why that favors sequential access.

Think of a record player's needle, physically moving across spinning vinyl to reach a specific track. Jumping between far-apart tracks takes real, measurable time, while playing straight through nearby tracks does not.

In plain words: a magnetic disk stores data on spinning platters, read by a physical head that must move to the right position before reading. Seek time is the time spent physically moving that head. Random access, jumping between far-apart locations, pays this cost repeatedly. Sequential access, reading nearby locations in order, pays it rarely.

A worked example. Reading a table's 1,000 rows in the order they were written, one block after another, is sequential and fast. Reading those same 1,000 rows in a random, scattered order is far slower, even though the same amount of data is read either way.

The key lines. No SQL; this is a hardware-level fact that shapes later decisions, not something queried directly.

Seek time, sequential access, random access

Seek time is the time a magnetic disk's physical head spends moving to a location before reading it. Sequential access reads nearby locations in order, paying seek time rarely. Random access jumps between far locations, paying it repeatedly.

Example: reading 1,000 rows stored contiguously is sequential; reading those same 1,000 rows scattered across the disk is random, and measurably slower on a magnetic disk.