Skip to content

perf(platform): usage charts read daily ledger rows for every granularity, so large orgs hit the 20,000-row cap sooner on 90-day views #4440

Closed

Description

@yannickmonney

Summary

After #4411 (merged as 50156d304f), every chart granularity on the usage page reads daily ledger rows, and weekly and monthly totals are then built from those rows. The independent merge review (TALE-359, 2026-10-06 15:45 Zurich) noticed one side effect. A large organization viewing a 90-day period now reaches the existing 20,000-row read cap sooner than before. When that happens, the totals show as capped or partial, with the existing warning, where they used to be complete.

Impact

  • PERFORMANCE / DATA, medium. The totals stay correct up to the cap and are labeled partial beyond it. But large organizations on long periods now see partial totals more often, and every view reads more rows than before.
  • No data is written or lost. This is a read-path limit.

Suggested direction

  • Aggregate in SQL (GROUP BY the requested bucket) instead of reading daily rows and summing them in the app, so the row cap applies to buckets, not to raw days.
  • Add a regression that seeds more than 20,000 daily rows across a 90-day window and asserts that complete weekly and monthly totals come back without the partial warning.
  • Keep fix(platform): preserve usage totals across chart granularities #4411's guarantee that totals match across daily, weekly and monthly views.

References

Activity

  1. added
    perf
    service: platform
    on Oct 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    perfservice: platform

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions