QUERY PLAN
Sort (cost=72.18..72.21 rows=11 width=26)
Sort Key: id
-> Seq Scan on tbl_sales_contract_invoices (cost=0.00..71.99 rows=11 width=26)
Filter: (contract_id = ANY ('{21,59,7,2,12,9,15,6,52,19}'::integer[]))