Skip to content

Performance: N+1 query audit and batched data loading #797

Description

@joelpeace48-cell

Context

List endpoints (campaigns with referral counts, dashboards) likely issue per-row follow-up queries
(N+1), which collapse under load.

Scope

  • Audit endpoints for N+1; batch with joins or dataloader-style batching.
  • Add query-count assertions in tests for key endpoints.

Acceptance criteria

  • Key list endpoints issue a constant number of queries regardless of row count.

Verification

  • Tests assert query count stays flat as result-set size grows.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: backendBackend API (Node/Express)difficulty: mediumModerate complexityjavascriptPull requests that update javascript codeperformancePerf and scalability

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions