QUERY PLAN
Sort (cost=80.37..80.41 rows=18 width=26)
Sort Key: id
-> Seq Scan on tbl_sales_contract_invoices (cost=0.00..79.99 rows=18 width=26)
Filter: (contract_id = ANY ('{4417,4390,4386,4408,4373,4393,4385,4394,4396,4414,4400,4388,4399}'::integer[]))