QUERY PLAN
Sort (cost=88.34..88.38 rows=17 width=26)
Sort Key: id
-> Seq Scan on tbl_sales_contract_invoices (cost=0.00..87.99 rows=17 width=26)
Filter: (contract_id = ANY ('{4486,4494,4480,4433,4257,3250,3247,3249,3300,3327,3348,4388,4453,4476,4479,4478}'::integer[]))