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