- Shipped
- April 25, 2026 at 11:19 PM UTC
- Author
- Kamo
- Commit
- 5c13630
The /api/support/tickets list endpoint was running, per page of 20 rows: - 20 **************** calls (N+1) - 20 calls into GeoLookupService.lookup, each of which is a range-scan against the GeoLite block table (millions of rows) plus a location fetch — ~40 extra queries on huge tables — even though the visitor record already has a stored country code. Fix: - getTickets bulk-fetches all visitors for the page in one query via **************** - toDTO is split: detail callers use the live-geo path; the list pass skips the GeoLite lookup entirely and just reads visitor.countryCode. This eliminates the dominant cost on the support-ticket page load.