QUERY PLAN
Sort (cost=93.78..93.84 rows=21 width=26)
Sort Key: id
-> Seq Scan on tbl_sales_contract_invoices (cost=0.00..93.32 rows=21 width=26)
Filter: (contract_id = ANY ('{3598,3502,3525,3537,3549,3550,3493,3620,3661,3703,3725,3755,3746,3763,3803,3857,3900,3724}'::integer[]))