Index the two shapes geolite_locations is actually queried by
Country alone was the only index on an 80,429-row table, and neither real query used it well. Measured on production: city resolution (country + subdivision)...
Index member_rights_applied, bound the intake claim, aggregate changelog stats
Three findings from an endpoint-by-endpoint audit, each measured against production rather than inferred. member_rights_applied declared no indexes at all whil...
Filter and page the grid in the database, batch the PHI audit trail
Loading /leads took 23.3 s at 1,427 leads. 23.3 s of that was the HIPAA audit trail: recordLeadList writes one phi_access_log row per lead returned, and each on...
Fetch the summary slices' to-one associations and count instead of scanning
The Overview's attention and recent slices read a title per row off a LAZY @ManyToOne, costing up to 16 extra selects per block under open-session-in-view. All ...
Geolite range index must be ASC, not YugabyteDB's default HASH
The IP lookup is a range scan: WHERE network_start <= ? ORDER BY network_start DESC LIMIT 1 YugabyteDB partitions the LEADING index column by HASH unless tol...
Match stored content on BLAKE3 alone, so a browser can afford to ask
Proving possession required both hashes, and a browser has no fast SHA3-256 β js-sha3 is pure JavaScript at ~25 MB/s. Measured on a 358 MB video that was ~20 se...
Read the latest snapshot date without loading the history
A summary needs one date. It was reading it by loading a two-year range of snapshots and taking the max β five domains times every day of history, on every page...
Answer the plan-matrix question for every app in one pass
The Apps & Features tab asks whether each app appears in the plan matrix, and the per-app form scans the plan-feature and add-on tables once per app β two dozen...
Index (borrower_uid, organization_id) for vault cross-loan reuse query
Paged repo queries + countByStatus for hot paths
- LoanRepository: countByStatus / countByOrganizationAndStatus + Page<Loan> findByStatus(...) / **************** / **************** + **************** for...
Collapse pipeline kanban N+1 to a single grouped count query
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 ...
Add findBySessionGuidIn for bulk loading
Used by the support-ticket list endpoint to fetch all visitors for a page in one query instead of N separate findBySessionGuid calls.
Fetch parent message in same query to eliminate reply N+1
Alias m.msg and LEFT JOIN FETCH msg.parent so that threaded reply messages have their parent loaded in the initial query rather than triggering a separate SELEC...
Fix N+1 query and add composite index for chat message loading
- Add LEFT JOIN FETCH m.msg to both repository queries to eagerly load MediaObjMsg in the same query, eliminating up to 100 extra SQL queries per chat windo...
Eliminate full-table scan and N+1 queries on leads endpoint
- LeadRepository: add findByOrganizationId JPQL query (uses ORG_ID index) instead of loading entire LEADS table and filtering in Java - LeadCustomFormDataRepo...
Like what you see shipping?
Every one of these updates lands in your workspace automatically. Start free and watch it grow week after week.