QUERY PLAN
GroupAggregate (cost=0.28..12.82 rows=1 width=69)
Group Key: e.id
-> Nested Loop Left Join (cost=0.28..12.80 rows=1 width=69)
Join Filter: (b.erp_collect_ticket_id = e.id)
-> Index Scan using tbl_erp_collect_tickets_pkey on tbl_erp_collect_tickets e (cost=0.28..8.30 rows=1 width=65)
Index Cond: (id = 2198)
Filter: (status = 2)
-> Seq Scan on tbl_erp_collect_ticket_bank_ins b (cost=0.00..4.49 rows=1 width=8)
Filter: (erp_collect_ticket_id = 2198)