Back to Decisions

Store performance scores as weighted average vs. raw scores

Accepted
Yuki Tanaka2024-03-10
data-modelperformancebackend
Context
Why this decision needed to be made

Performance reviews have multiple dimensions (goals, values, skills) each with their own score. We need to decide whether to persist a single computed weighted average or store all raw dimension scores and compute on the fly.

Options Considered
Comparison of available options
OptionProsConsChosen
Store weighted average only
  • Simpler queries
  • Faster to display
  • Less storage
  • Lose granularity
  • Cannot reweight retroactively
  • Hard to audit
—
Store both raw scores and computed averageSelected
  • Full audit trail
  • Can reweight without data migration
  • Richer analytics
  • More storage
  • Risk of stale computed value if weights change
Outcome
What was decided

Store both raw dimension scores and a computed weighted average

Rationale
Why this option was chosen

Storing raw scores allows us to reweight dimensions in future without migrating data. The computed average is cached for display performance but always recalculated on save to stay consistent.