QUERY PLAN
Hash Join (cost=95.01..180.56 rows=18 width=62)
Hash Cond: (r.erp_payment_ticket_id = t.id)
-> Seq Scan on tbl_erp_payment_ticket_settles r (cost=0.00..85.50 rows=18 width=62)
Filter: (erp_other_payment_ticket_id = ANY ('{16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1}'::integer[]))
-> Hash (cost=67.60..67.60 rows=2193 width=4)
-> Seq Scan on tbl_erp_payment_tickets t (cost=0.00..67.60 rows=2193 width=4)
Filter: (status = ANY ('{2,5}'::integer[]))