Why Does a Short Query Repeat So Much Work?

A compact query can scan the same table repeatedly. Read the access plan, preserve the answer, and compare work on data that resembles the real job.

13 sections · 4 questions · 1 coding challenge

1 / 13

Choosing Work from a Declarative Request

BOTIE

The System R work showed how a database could choose access paths for a declarative request instead of requiring the caller to prescribe every step. That freedom creates several possible plans for the same logical result. Estimating their costs depends on what the engine knows about the data.

EXPLAIN facilities make some of those choices visible. Their formats and meanings are engine-specific, and SQLite warns that its query-plan output can change. We will inspect plan structure without treating exact display text as an application API.

Sources for this history