QUERY PLAN
Sort (cost=85.83..85.89 rows=23 width=26)
Sort Key: id
-> Seq Scan on tbl_sales_contract_invoices (cost=0.00..85.31 rows=23 width=26)
Filter: (contract_id = ANY ('{3392,3364,3348,3363,3388,3415,3384,3426,3502,3525,3537,3549,3550,3493,3620,3598,3661,3703,3724,3725}'::integer[]))