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,4494,4495,4480,4467,4476,4479,4478}'::integer[]))