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 ('{2014,3170,3649,3636,2733,2732,2551}'::integer[]))