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