AlgoViz
← All scenarios
🧭 Scenario · Make the call

The lookup that reads the whole table

The situation

A shopping site has an `orders` table with 50 million rows. The support team constantly runs 'find the order with this tracking number', and each lookup takes 8 seconds. Watching the database, you see that to find one matching row it reads all 50 million rows, one by one, checking each tracking number. There's nothing wrong with the answer — it just looks at everything to find the few rows it needs.

You haven't read about this exact system. That's the point — walk the three questions a designer asks: what's really wrong, what fixes it, and what does the fix cost?

1

Diagnose

Read past the story. What's the REAL problem — not what the feature does, but what's actually going wrong?

Look past the story. What's the REAL problem here?