QUERY PLAN
Sort (cost=48.99..49.01 rows=9 width=34)
Sort Key: id
-> Seq Scan on tbl_sales_contract_payments (cost=0.00..48.85 rows=9 width=34)
Filter: (contract_id = ANY ('{1186,3108,3830,3842,3803,3854}'::integer[]))