QUERY PLAN
Sort (cost=52.77..52.80 rows=8 width=26)
Sort Key: id
-> Seq Scan on tbl_sales_contract_invoices (cost=0.00..52.66 rows=8 width=26)
Filter: (contract_id = ANY ('{4071,3736,4132,4131,4130,4111}'::integer[]))