QUERY PLAN
Aggregate (cost=3.77..3.78 rows=1 width=32)
-> Hash Join (cost=1.11..3.76 rows=1 width=32)
Hash Cond: (t.id = r.erp_other_income_ticket_id)
-> Seq Scan on tbl_erp_other_income_tickets t (cost=0.00..2.50 rows=38 width=4)
Filter: (status = ANY ('{2,5}'::integer[]))
-> Hash (cost=1.10..1.10 rows=1 width=36)
-> Seq Scan on tbl_erp_other_income_ticket_purchase_contract_settles r (cost=0.00..1.10 rows=1 width=36)
Filter: (purchase_contract_id = 4485)