QUERY PLAN
Sort (cost=57.44..57.46 rows=8 width=26)
Sort Key: id
-> Seq Scan on tbl_sales_contract_invoices (cost=0.00..57.32 rows=8 width=26)
Filter: (contract_id = ANY ('{1558,4131,4140,4135,4136,4137,4138,4139}'::integer[]))