QUERY PLAN
Aggregate (cost=304.58..304.59 rows=1 width=32)
-> Seq Scan on tbl_erp_cash_cost_tickets (cost=0.00..304.58 rows=1 width=5)
Filter: ((purchase_contract_id = 4189) AND (status = ANY ('{1,2,5}'::integer[])))