QUERY PLAN
Sort (cost=82.22..82.27 rows=23 width=18)
Sort Key: id
-> Seq Scan on tbl_sales_contract_payments (cost=0.00..81.70 rows=23 width=18)
Filter: (contract_id = ANY ('{3770,3822,3797,3791,3805,3792,3812,3811,3816,3831,3830,3841,3842,3837,3809,3803,3840,3844,3843,3845}'::integer[]))