QUERY PLAN
Sort (cost=91.30..91.35 rows=21 width=26)
Sort Key: id
-> Seq Scan on tbl_sales_contract_invoices (cost=0.00..90.84 rows=21 width=26)
Filter: (contract_id = ANY ('{3525,3537,3549,3550,3620,3598,3661,3703,3755,3724,3725,3746,3763,3841,3803,3840,3844,3843}'::integer[]))