Andrew Gierth <and...@tao11.riddles.org.uk> writes: > The model (assuming I understand it rightly) is that what we're actually > tracking is a startup cost and a per-output-row cost, but for comparison > purposes we actually store the rows and the computed total, rather than > just the per-row cost:
> rows > startup_cost > total_cost = startup_cost + (rows * per_row_cost) Right. I tend to think of it differently: the cost to retrieve the first K rows out of a total of N is startup_cost + (total_cost - startup_cost) * K/N but that comes out to the same thing as what Andrew said. regards, tom lane