QUERY PLAN
Sort (cost=51.31..51.33 rows=8 width=34)
Sort Key: id
-> Seq Scan on tbl_sales_contract_payments (cost=0.00..51.19 rows=8 width=34)
Filter: (contract_id = ANY ('{3364,3732,3831,3840,3843,3844,3845}'::integer[]))