QUERY PLAN
Nested Loop (cost=1.29..5.13 rows=1 width=84)
-> Hash Right Join (cost=1.29..2.44 rows=1 width=31)
Hash Cond: (b.id = e.erp_bank_id)
-> Seq Scan on tbl_erp_banks b (cost=0.00..1.11 rows=11 width=10)
-> Hash (cost=1.28..1.28 rows=1 width=25)
-> Seq Scan on tbl_erp_other_payment_ticket_bank_ins e (cost=0.00..1.28 rows=1 width=25)
Filter: ((settle_at IS NOT NULL) AND (amount > '0'::numeric) AND (erp_other_payment_ticket_id = 42) AND (id = 25))
-> Seq Scan on tbl_erp_other_payment_tickets t (cost=0.00..2.67 rows=1 width=53)
Filter: ((status = ANY ('{2,5}'::integer[])) AND (id = 42))