So, I wonder if this could actually do the trick we talked about:
If the $lcost is more than the $rcost, the condition would evaluate to 1, and so the cost is incremented by one, thus penalizing that plan slightly. Should be enough to break the symmetry, right?
It assumes that the LHS is what is materialized though, I haven't checked if that is actually the case in the code.
So, I wonder if this could actually do the trick we talked about:
If the
$lcost
is more than the$rcost
, the condition would evaluate to 1, and so the cost is incremented by one, thus penalizing that plan slightly. Should be enough to break the symmetry, right? It assumes that the LHS is what is materialized though, I haven't checked if that is actually the case in the code.Cheers,
Kjetil