QUERY PLAN
Sort (cost=67.31..67.33 rows=7 width=26)
Sort Key: id
-> Seq Scan on tbl_sales_contract_invoices (cost=0.00..67.21 rows=7 width=26)
Filter: (contract_id = ANY ('{3364,3732,3831,3840,3843,3844,3845}'::integer[]))