QUERY PLAN
Aggregate (cost=428.48..428.49 rows=1 width=8)
-> Sort (cost=383.36..390.88 rows=3008 width=238)
Sort Key: r.verify_at DESC NULLS LAST
-> HashAggregate (cost=179.50..209.58 rows=3008 width=238)
Group Key: r.id
-> Hash Right Join (cost=123.68..171.98 rows=3008 width=12)
Hash Cond: (rvr.erp_ticket_change_log_id = r.id)
-> Seq Scan on tbl_erp_ticket_change_log_handlers rvr (cost=0.00..41.37 rows=2637 width=4)
-> Hash (cost=86.08..86.08 rows=3008 width=12)
-> Seq Scan on tbl_erp_ticket_change_logs r (cost=0.00..86.08 rows=3008 width=12)