-- group: plans -- seed: flows -- Each of 150,000 flows joined to the place at either end by its key: a scan -- of flows and two seeks of the places' key index per flow, then the row. SELECT count(*), sum(f.n), max(a.tag), max(b.tag) FROM flows f JOIN places a ON a.code = f.src JOIN places b ON b.code = f.dst;