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