KamoCRM

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

Performancekamo-shared-library
Shipped
15 மே, 2026 அன்று 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?

All of it arrives in your workspace on its own. Start on the free plan and read this page again in a month.

Start Free ForeverView Pricing