QUERY PLAN
Sort (cost=85.77..85.82 rows=21 width=28)
Sort Key: id
-> Seq Scan on tbl_sales_contract_invoices (cost=0.00..85.31 rows=21 width=28)
Filter: (contract_id = ANY ('{4140,4139,4138,4137,4136,4135,4130,4129,4120,4112,4131,4111,4109,4106,4099,4094,4091,4086,4083,4082}'::integer[]))