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