Problem
The dominant analytics query is per-short-code over a date range, but tblActivityLog only has single-column indexes; monthly partitioning is a commented suggestion, not enabled (confirms earlier audit #12).
Fix
Add IDX_log_shortcode_created (shortCode, createdAt); review whether standalone IDX_log_shortcode/IDX_log_org remain justified given write cost. Decide on monthly partitioning before analytics ships.
Relates to analytics issues #41/#42.
Acceptance criteria
From the 2026-06-04 schema review — see docs/SCHEMA_REVIEW_2026-06-04.md.
Problem
The dominant analytics query is per-short-code over a date range, but
tblActivityLogonly has single-column indexes; monthly partitioning is a commented suggestion, not enabled (confirms earlier audit #12).Fix
Add
IDX_log_shortcode_created (shortCode, createdAt); review whether standaloneIDX_log_shortcode/IDX_log_orgremain justified given write cost. Decide on monthly partitioning before analytics ships.Relates to analytics issues #41/#42.
Acceptance criteria
From the 2026-06-04 schema review — see
docs/SCHEMA_REVIEW_2026-06-04.md.