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