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 ('{4496,4497,4486,4491,4492,4480,4479,4478}'::integer[]))