1min.

1MIN · DATABASES

GitHub cut star-history requests by filtering before aggregating

GitHub’s star-history endpoint returns daily counts without individual identities. It filters rows to an indexed calendar range before aggregation, instead of grouping a repository’s entire star set and then paginating. GitHub reports roughly 24 requests instead of 2,511 for React’s history. The result reflects current stars rather than a permanent event log, and unusually busy weeks can still be expensive.

GitHub · Oct 14, 2026

Why it matters

Smaller JSON responses do not necessarily mean less database work; operation order matters.

More context

Try the dedicated repository star-history API for trends. Each response covers up to 30 weeks, replacing identity-based pagination for this use case.

Keep in mind

Removed stars disappear from the underlying model, so the curve is not an exact historical ledger of all starring and unstarring events.

Original read

More engineering ideas, one minute at a time.

Explore more stories