QUERY PLAN
Sort (cost=85.04..85.09 rows=21 width=28)
Sort Key: id
-> Seq Scan on tbl_sales_contract_invoices (cost=0.00..84.58 rows=21 width=28)
Filter: (contract_id = ANY ('{4090,4088,4087,4086,4083,4082,4073,4071,4068,4065,4064,4055,4054,4050,4049,4061,4048,4047,4046,4044}'::integer[]))