QUERY PLAN
Sort (cost=18.44..18.46 rows=9 width=16)
Sort Key: remind_date
-> Seq Scan on tbl_service_contract_remind_dates (cost=0.00..18.30 rows=9 width=16)
Filter: ((NOT reminded) AND (contract_id = ANY ('{4024,4022,4021,4020,4028,4027,4009,4005,4002,4016,4008,3998,3997,3995,3993,3989,3984,3980,3979,3978}'::integer[])))