QUERY PLAN
Sort (cost=66.78..66.80 rows=8 width=26)
Sort Key: id
-> Seq Scan on tbl_sales_contract_invoices (cost=0.00..66.66 rows=8 width=26)
Filter: (contract_id = ANY ('{4422,4430,4424,4426,4444,4433,4443,4446}'::integer[]))