KamoCRM

Fetch parent message in same query to eliminate reply N+1

Performancekamo-shared-library
Shipped
12 மார்ச், 2026 அன்று 2:34 AM UTC
Author
Kamo
Commit
49747b4

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 SELECT per reply

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