9.3. Cost classes
Direction, not decided
The fast core classifies every rule and view column by its update cost per event:
-
O(1):
sum,count,last of,ever. -
O(1), with state that grows with the number of distinct values:
where never X(field). -
O(log n): a group
minormax. -
O(key history): the recompute fallback.
-
O(rows pointing here): a lookup.
The classification is needed anyway to pick the update strategy. Each class gets a proved cost bound in a step-counting cost model: asymptotic, in the model, not real time and not Postgres. Uses: a proved cost report at deploy, the choice of strategy (direct, batched, eventual), and optional limits later (for example, transactional rules must be O(1)). Never a restriction of the language itself.