Olston, C. and Widom, J. (2000). Offering a precision-performance tradeoff for aggregation queries over replicated data. In Proc. VLDB 2000, pp. 144–155.
Key takeaways
Read in full (NOTE-922). Olston and Widom propose TRAPP: caches hold, for each numeric value, an interval its source guarantees to contain the current value, the source pushing a refresh whenever the value leaves it. A query carries a precision constraint R, and the system chooses which values to fetch exactly so that the answer interval is at most R wide whatever the true values, at least total refresh cost. For SUM (and AVG without a predicate) that choice is a 0/1 knapsack problem, NP-complete in general and polynomial with equal costs; COUNT and MIN have simple rules. Staleness becomes bounded imprecision, never error, and the cost of the source-side upkeep that guarantees this, and of setting the bound widths, is outside the optimization. The one experiment is 90 stock prices with random costs.
Why this is here
QUESTION-114: cached values are held as intervals the source keeps valid, so a cached value is never wrong, only imprecise, and each query fetches the cheapest exact values that meet its precision. Staleness is a hard bound per query here; the trade against refresh cost is in LIT-1109.