perf(request-logs): serve listing totals from the demand rollup plus raw tail (#1615)
The listing total was an exact COUNT(*) over the filtered set — a full pass over request_logs (4.4s warm, 9-19s under contention at 4.5M rows) re-run every 30s when the count cache expires at the dashboard's poll interval. The demand quarter rollup carries status as a dimension, so every listing filter except free-text search and error-code splits maps onto it: count the folded window as one SUM(request_count) bounded by the hourly watermark (new sum_demand_window primitive) and only the un-folded complement from raw. Totals stay exactly equal to the raw count for every watermark position; no watermark degrades to the legacy count. Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
S
Soju06 committed
778c533fea403240ea30e2a03dbbe305f924e991
Parent: 09e1b5c
Committed by GitHub <noreply@github.com>
on 8/6/2026, 5:52:31 AM