mirror of
https://github.com/esengine/DeepSeek-Reasonix.git
synced 2026-11-07 10:45:59 -10:00
Opt-in metrics carried the anonymous install id so the dashboard could show a deduplicated daily user per signal. Keeping that answer meant keeping a row per install per signal per day — ~28M of them — and the 30-day COUNT(DISTINCT install_id) over that table was the database's entire read bill: the primary key leads with `date`, so each query could prune only the window and scanned the whole table, eight signals an hour, ~5.4B rows a day for one module. The client stops sending the id, the worker stops writing and creating the tables, the hourly rollup that existed only to make that query survivable is gone, and the dashboard's users/opens toggle goes with it. The aggregate tables keep the same signals as event counts in ~180k rows. migrate-drop-metric-users.sql drops the four retired tables. Deploy the worker first — it stops creating them at runtime, and a DROP before that is rebuilt on the next request.