QUERY PLAN
Sort (cost=99.24..99.30 rows=25 width=29)
Sort Key: id
-> Seq Scan on tbl_sales_contract_invoices (cost=0.00..98.66 rows=25 width=29)
Filter: (contract_id = ANY ('{4417,4414,4408,4400,4399,4396,4394,4393,4390,4388,4386,4385,4373,4377,4366,4364,4360,4359,4363,4357}'::integer[]))