QUERY PLAN
Sort (cost=66.78..66.80 rows=8 width=26)
Sort Key: id
-> Seq Scan on tbl_sales_contract_invoices (cost=0.00..66.66 rows=8 width=26)
Filter: (contract_id = ANY ('{4486,4417,4422,4430,4426,4394,4414,4388}'::integer[]))