Memory-bound operators hold their working set: a sort holds what it sorts, a hash join holds a build side, a hash aggregate holds its groups. Under the cap, engines refuse (an OOM error) or spill (partial results to disk, merge later — silent except in the plan and the wall clock). The everyday offenders are habits: ORDER BY on a million-row result (limit_row_goal's TOP_N is the cure when the LIMIT is there), sorting before filtering, DISTINCT over SELECT-* width.
SELECT item, qty, note FROM inv ORDER BY qty DESC ;
SELECT item FROM inv ORDER BY qty DESC LIMIT 3;
The export sorted every column of every row when only the top items were read — a sort holds its whole working set in memory, so an ORDER-BY-everything on a big wide table spills to disk (or errors under a cap); narrowing and LIMITing sorts far less.
Late/narrow sorts; filter-then-sort; LIMIT where top-k is meant; plan-check on the bimodal-duration tell.