QUERY PLAN
Sort (cost=85.70..85.74 rows=18 width=26)
Sort Key: id
-> Seq Scan on tbl_sales_contract_invoices (cost=0.00..85.32 rows=18 width=26)
Filter: (contract_id = ANY ('{1186,529,786,1558,26,1692,1697,655,616,656,1091,653,798,1177,522}'::integer[]))