Planner Cost Numbers Are Made-Up Units, Not Milliseconds
Every line of an EXPLAIN plan carries cost=0.29..8.31 rows=1 width=64. The two costs are startup cost (work before the first row comes out) and total cost (work to produce all rows), measured in arbitrary planner units where 1.0 is the cost of reading one page sequentially. They are not milliseconds and do not convert to milliseconds. They are only useful for comparing one plan against another, which is exactly what the optimizer uses them for.
Questions this Concept answers
- Why is a plan's cost number not convertible into a prediction of runtime?
EXPLAIN
The cost numbers EXPLAIN prints are not seconds; they are made-up units where one unit is roughly the cost of reading one page from disk in sequence. The first number is the cost to return the first …