QUERY PLAN
Sort (cost=61.45..61.47 rows=8 width=26)
Sort Key: id
-> Seq Scan on tbl_sales_contract_invoices (cost=0.00..61.33 rows=8 width=26)
Filter: (contract_id = ANY ('{1186,4457,4467,4476,4462,4481}'::integer[]))