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