QUERY PLAN
Sort (cost=67.31..67.33 rows=7 width=28)
Sort Key: id
-> Seq Scan on tbl_sales_contract_invoices (cost=0.00..67.21 rows=7 width=28)
Filter: (contract_id = ANY ('{3649,3636,3170,2732,2733,2551,2014}'::integer[]))