QUERY PLAN
Sort (cost=64.09..64.11 rows=7 width=26)
Sort Key: id
-> Seq Scan on tbl_sales_contract_invoices (cost=0.00..63.99 rows=7 width=26)
Filter: (contract_id = ANY ('{4359,4325,4316,4408,4272,4414,4400}'::integer[]))