QUERY PLAN
Aggregate (cost=146.09..146.10 rows=1 width=32)
-> HashAggregate (cost=106.84..124.28 rows=1744 width=319)
Group Key: l.id
-> Hash Right Join (cost=77.24..102.48 rows=1744 width=9)
Hash Cond: (eh.erp_bank_amount_change_log_id = l.id)
-> Seq Scan on tbl_erp_bank_amount_change_log_handlers eh (cost=0.00..21.65 rows=1365 width=8)
-> Hash (cost=55.44..55.44 rows=1744 width=21)
-> Seq Scan on tbl_erp_bank_amount_change_logs l (cost=0.00..55.44 rows=1744 width=21)