QUERY PLAN
Sort (cost=78.09..78.14 rows=20 width=26)
Sort Key: id
-> Seq Scan on tbl_sales_contract_invoices (cost=0.00..77.66 rows=20 width=26)
Filter: (contract_id = ANY ('{4055,3661,3703,3763,3755,3724,3725,3746,3803,3857,3935,3916,3900,3967,3978,3997,4088}'::integer[]))