QUERY PLAN
Sort (cost=82.28..82.34 rows=25 width=22)
Sort Key: id
-> Seq Scan on tbl_sales_contract_payments (cost=0.00..81.70 rows=25 width=22)
Filter: (contract_id = ANY ('{3822,3812,3811,3770,3809,3805,3808,3783,3787,3782,3778,3777,3771,3767,3763,3761,3759,3758,3755,3749}'::integer[]))