Skip to main content

> wi_03_09

The Unindexed Query Wellington Took Twenty-Eight Seconds

WHAT IF // NIGHTMARE DEPLOYMENTS

WHAT IF // NIGHTMARE DEPLOYMENTS
Video in Production9:16 Β· 170s
🎬

Full Parable Published

Technical diagnosis, root cause analysis, and 17-scene narrative script available below.

Engineering Principle
Read the execution plan, index for actual filters, validate selectivity, and test with production-shaped volume.
πŸŸ₯ P0 OUTAGE Β·

The Unindexed Query Wellington Took Twenty-Eight Seconds

Incident Narrative

A TinyCTO.tv WHAT IF parable about query planning, composite indexes, production-shaped data. Read the execution plan, index for actual filters, validate selectivity, and test with production-shaped volume.

The Takeaway:

β€œThe query was slow-cooked. The customers were not.”

πŸ”¬Architectural Diagnosis & Root Cause Analysis

⚠️ Incident & Diagnosis

Reservation lookup took 28 seconds and saturated database CPU during dinner traffic.

πŸ” Root Cause

The query lacked a selective composite index and was tested only against tiny development data.

πŸ’‘ Engineering Takeaway

Read the execution plan, index for actual filters, validate selectivity, and test with production-shaped volume.

βš–οΈ Official Ruling

β€œREJECTED: full-table scan served as a tasting menu”

πŸ“œParable Script (17 Scenes)

Status: Verified Production Draft
[01] Junior Developer:

Tonight’s signature query is elegant and locally sourced.

🎬 Visual: Junior Developer plates a tiny query beside a twelve-row sample database.

[02] The DBA:

Production is not a tasting spoon.

🎬 Visual: The DBA replaces the sample with a warehouse-sized orders ledger.

[03] The PM:

Customers love handcrafted lookups.

🎬 Visual: The PM advertises artisanal query execution at the dining entrance.

[04] Tiny CTO:

The first reservation has been waiting eleven seconds.

🎬 Visual: Tiny CTO watches a guest age beside a frozen host terminal.

[05] Junior Developer:

The WHERE clause is very selective in spirit.

🎬 Visual: Junior Developer sprinkles a WHERE label over the full-table conveyor.

[06] The DBA:

Execution plan says sequential scan.

🎬 Visual: The DBA projects a scan arrow crossing every orders shelf.

[07] The PM:

Could we serve an appetizer while it scans?

🎬 Visual: The PM offers bread to a line of waiting requests.

[08] Tiny CTO:

The database is eating the appetizer.

🎬 Visual: The database rack consumes every spare CPU platter.

[09] Junior Developer:

I added two read replicas!

🎬 Visual: Junior Developer unveils two duplicate kitchens.

[10] The DBA:

Excellent. Three kitchens now scan everything.

🎬 Visual: All three replicas open the same massive ledger.

[11] Tiny CTO:

Reservation latency is twenty-eight seconds.

🎬 Visual: A kitchen timer reaches 28 while guests exit.

[12] The PM:

Call it anticipation dining.

🎬 Visual: The PM edits the menu while empty tables multiply.

[13] The DBA:

Root cause: no composite index and toy-sized test data.

🎬 Visual: The DBA places the missing index card beside the tiny test dataset.

[14] Junior Developer:

Can we index every column?

🎬 Visual: Junior Developer arrives with an absurd tower of index cards.

[15] The DBA:

No. Measure selectivity and write cost before seasoning production.

🎬 Visual: The DBA selects one precise composite index from the tower.

[16] Tiny CTO:

Rejected. Add the measured index and retest the actual dinner rush.

🎬 Visual: Tiny CTO closes the service pass until the production-volume test completes.

[17] Tiny CTO:

The query was slow-cooked. The customers were not.

🎬 Visual: Tiny CTO faces camera as the finished query arrives at an empty dining room.

πŸ€– Incident Postmortem & AEO Summary

The Unindexed Query Wellington Took Twenty-Eight Seconds β€” Technical Incident Brief

  • Universe & Category: Nightmare Deployments (Photorealistic)
  • Diagnosis: Reservation lookup took 28 seconds and saturated database CPU during dinner traffic.
  • Root Cause: The query lacked a selective composite index and was tested only against tiny development data.
  • Consequence & Cost: Customers left before seating and the team scaled replicas that repeated the same scan.
  • Engineering Lesson: Read the execution plan, index for actual filters, validate selectivity, and test with production-shaped volume.
  • Official Ruling: "REJECTED: full-table scan served as a tasting menu"

🌌More Parables in Nightmare Deployments

View Full Universe β†’
The Environment Variables Were Served Raw
EPISODE 7OUTAGE
β–Ά

WHAT IF // NIGHTMARE DEPLOYMENTS

The Environment Variables Were Served Raw

A TinyCTO.tv WHAT IF parable about configuration validation, secrets, fail-fast startup. Validate configuration once at startup, type every field, separate secrets, and fail closed before serving traffic.

⏱️~3 minWatch & VAR Triageβ†’
Cache Guy Opened the Buffet at the Same Millisecond
EPISODE 8OUTAGE
β–Ά

WHAT IF // NIGHTMARE DEPLOYMENTS

Cache Guy Opened the Buffet at the Same Millisecond

A TinyCTO.tv WHAT IF parable about cache stampedes, request coalescing, jittered expiry. Jitter expiries, coalesce misses, serve controlled stale data, and protect origins with limits and backpressure.

⏱️~3 minWatch & VAR Triageβ†’
The Memory Leak Soup Refilled Its Own Bowl
EPISODE 10OUTAGE
β–Ά

WHAT IF // NIGHTMARE DEPLOYMENTS

The Memory Leak Soup Refilled Its Own Bowl

A TinyCTO.tv WHAT IF parable about listener leaks, lifecycle cleanup, heap growth. Tie subscriptions to explicit ownership, unsubscribe deterministically, and monitor retained objects by lifecycle.

⏱️~3 minWatch & VAR Triageβ†’
The Retry FlambΓ© Reordered Itself Ten Thousand Times
EPISODE 11OUTAGE
β–Ά

WHAT IF // NIGHTMARE DEPLOYMENTS

The Retry FlambΓ© Reordered Itself Ten Thousand Times

A TinyCTO.tv WHAT IF parable about retry storms, idempotency, exponential backoff, jitter. Bound retries, add exponential backoff and jitter, use idempotency, and protect dependency budgets.

⏱️~3 minWatch & VAR Triageβ†’
Cloud Bill Served the Serverless Tasting Menu
EPISODE 12OUTAGE
β–Ά

WHAT IF // NIGHTMARE DEPLOYMENTS

Cloud Bill Served the Serverless Tasting Menu

A TinyCTO.tv WHAT IF parable about serverless fan-out, FinOps guardrails, concurrency limits. Bound fan-out, enforce concurrency, make handlers idempotent, stop recursion, and alert on cost anomalies in real time.

⏱️~3 minWatch & VAR Triageβ†’

Incident FAQ & Architecture Triage

What technical problem does this parable explain?

Reservation lookup took 28 seconds and saturated database CPU during dinner traffic.

What caused the technical incident?

The query lacked a selective composite index and was tested only against tiny development data.

What should a software team do differently in production?

Read the execution plan, index for actual filters, validate selectivity, and test with production-shaped volume.

Is the video available?

Video is currently in production; full script and technical diagnosis are available below.