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