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