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 ('{4074,4073,4071,4068,4065,4064,4055,4054,4050,4049,4061,4048,4047,4046,4044,4043,4036,4029,4035,4026}'::integer[]))