Paged repo queries + countByStatus for hot paths

Performancekamo-shared-library
Shipped
May 28, 2026 at 11:53 PM UTC
Author
Kamo
Commit
1c9fae1

- LoanRepository: countByStatus / countByOrganizationAndStatus + Page<Loan> findByStatus(...) / **************** / **************** + **************** for collision-resistant numbering - LoanPaymentRepository: paged sweeps for AutoDebitRunJob (autodebit + retry + disbursement branches), existsByLoanIdAndKind, findByLoanIdAndStatusAndKindIn (reconciliation), countByLoanIdAndStatus - LoanStatementRepository: **************** for the reminder-scheduling daily sweep Cumulative effect: replaces 5 full-table-scan O(N) / O(N²) cron paths with indexed COUNT(*) + paged WHERE queries.

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