QUERY PLAN
Hash Join (cost=97.62..196.45 rows=20 width=62)
Hash Cond: (r.erp_payment_ticket_id = t.id)
-> Seq Scan on tbl_erp_payment_ticket_settles r (cost=0.00..98.78 rows=20 width=62)
Filter: (erp_cost_ticket_id = ANY ('{58,59,57,53,54,56,55,52,51,50,49,48,47,46,45,44,43,42,41,40}'::integer[]))
-> Hash (cost=68.42..68.42 rows=2336 width=4)
-> Seq Scan on tbl_erp_payment_tickets t (cost=0.00..68.42 rows=2336 width=4)
Filter: (status = ANY ('{2,5}'::integer[]))