make optimized plan deterministic