QUERY PLAN
Sort (cost=73.92..73.96 rows=14 width=28)
Sort Key: id
-> Seq Scan on tbl_sales_contract_invoices (cost=0.00..73.66 rows=14 width=28)
Filter: (contract_id = ANY ('{3366,3386,2236,3259,3484,3459,2269,3477,3681,2286}'::integer[]))