Reading performance & plans
Exercise · SQL & Querying

Predict, then run it

Predict the output

inv(item, qty, note) — a top-items question. Sort narrow and LIMIT so the engine sorts far less than the whole wide table:

SELECT item FROM inv ORDER BY qty DESC LIMIT 3;

Predict the exact output.