QUERY PLAN
Sort (cost=85.10..85.15 rows=23 width=26)
Sort Key: id
-> Seq Scan on tbl_sales_contract_invoices (cost=0.00..84.58 rows=23 width=26)
Filter: (contract_id = ANY ('{4075,4082,3620,3525,3661,3703,3763,3755,3724,3725,3746,3803,3857,3935,3916,3900,3967,3978,3997,4055}'::integer[]))