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