mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-08 20:42:43 +00:00
A long-window read of a dense series sent two statements over the same canonical rows, the day or hour buckets and the strip's figures, so a ten-year pulse read picked the canonical source per day and scanned the readings twice. Both aggregates now run in one statement over the window materialised once, with the same SQL each had (dense-series-read.ts). An integration test keeps the two old statements as the reference and requires the same buckets and figures for pulse (two ranked sources), glucose and oxygen saturation, day and hour grains, in UTC, Europe/Berlin, Asia/Kolkata and America/New_York, and the same empty answer for a type without readings.