QUERY PLAN
Sort (cost=89.02..89.08 rows=27 width=26)
Sort Key: id
-> Seq Scan on tbl_sales_contract_invoices (cost=0.00..88.38 rows=27 width=26)
Filter: (contract_id = ANY ('{4024,4046,4147,4044,4035,4129,4168,4198,4197,4226,3941,3931,3924,3952,3958,4020,4027,4008,4061,3953}'::integer[]))