QUERY PLAN
Nested Loop (cost=1.78..5.65 rows=1 width=84)
-> Hash Right Join (cost=1.78..2.93 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.77..1.77 rows=1 width=25)
-> Seq Scan on tbl_erp_other_collect_ticket_bank_outs e (cost=0.00..1.77 rows=1 width=25)
Filter: ((settle_at IS NOT NULL) AND (amount > '0'::numeric) AND (erp_other_collect_ticket_id = 64) AND (id = 75))
-> Seq Scan on tbl_erp_other_collect_tickets t (cost=0.00..2.71 rows=1 width=53)
Filter: ((bank_settle_at IS NOT NULL) AND (status = ANY ('{2,5}'::integer[])) AND (id = 64))