QUERY PLAN
Sort (cost=86.61..86.68 rows=27 width=26)
Sort Key: id
-> Seq Scan on tbl_sales_contract_invoices (cost=0.00..85.97 rows=27 width=26)
Filter: (contract_id = ANY ('{4055,4112,4106,4235,4144,3763,3755,3725,3746,3803,3857,3935,3900,3967,3978,3997,3916,4253,4252}'::integer[]))