QUERY PLAN
Limit (cost=66.76..66.81 rows=20 width=111)
-> Sort (cost=66.71..68.34 rows=652 width=111)
Sort Key: r.created_at DESC
-> HashAggregate (cost=39.58..46.10 rows=652 width=111)
Group Key: r.id
-> Hash Right Join (cost=26.67..37.95 rows=652 width=111)
Hash Cond: (rvr.erp_ticket_change_log_id = r.id)
-> Seq Scan on tbl_erp_ticket_change_log_handlers rvr (cost=0.00..9.76 rows=576 width=4)
-> Hash (cost=18.52..18.52 rows=652 width=111)
-> Seq Scan on tbl_erp_ticket_change_logs r (cost=0.00..18.52 rows=652 width=111)