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