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 ('{3763,2148,3997,3978,3967,3900,3803,2141,2865,2836,2909,1186,1934,1930,1872,1842,1843,1756,1734,1702}'::integer[])))