QUERY PLAN
Sort (cost=74.12..74.17 rows=21 width=28)
Sort Key: id
-> Seq Scan on tbl_sales_contract_invoices (cost=0.00..73.66 rows=21 width=28)
Filter: (contract_id = ANY ('{3835,1044,1414,2286,2447,1866,3493,1541,765,229}'::integer[]))