QUERY PLAN
Limit (cost=57.05..57.10 rows=20 width=108)
-> Sort (cost=57.05..58.53 rows=592 width=108)
Sort Key: r.created_at DESC
-> HashAggregate (cost=35.38..41.30 rows=592 width=108)
Group Key: r.id
-> Hash Right Join (cost=24.32..33.90 rows=592 width=108)
Hash Cond: (rvr.erp_ticket_change_log_id = r.id)
-> Seq Scan on tbl_erp_ticket_change_log_handlers rvr (cost=0.00..8.20 rows=520 width=4)
-> Hash (cost=16.92..16.92 rows=592 width=108)
-> Seq Scan on tbl_erp_ticket_change_logs r (cost=0.00..16.92 rows=592 width=108)