QUERY PLAN
Sort (cost=126.28..126.37 rows=37 width=26)
Sort Key: id
-> Seq Scan on tbl_sales_contract_invoices (cost=0.00..125.32 rows=37 width=26)
Filter: (contract_id = ANY ('{4486,4493,4494,4349,4495,4480,4481,4433,4248,4235,4257,4291,4285,4324,4323,4373,4055,4112,4106,4144,4388,4446,4453,4399,4467,4476,4462,4479,4457,4478}'::integer[]))