Collapse pipeline kanban N+1 to a single grouped count query

Performancekamo-shared-library
Shipped
May 15, 2026 at 8:52 PM UTC
Author
Kamo
Commit
2f09c13

listForOrganization() used to issue one condition-fetch per loan (201 queries at 200 loans). Now a single grouped JPQL aggregate keyed by loanFile.uid projects open and blocking-open counts into LoanConditionCountsRow, and the service merges that map with the apps list — 2 queries regardless of size.

All changes

Like what you see shipping?

Every one of these updates lands in your workspace automatically. Start free and watch it grow week after week.

Start Free ForeverView Pricing