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