Most query optimizations do not take into account whether a column (or expression) is indexed.
In most cases, the optimization can make reasonable choices by simply taking into account the type of the expressions (example: constant vs parameter vs column, ...).
In some cases (especially in the case of symmetries) information coming from the model could help choose the most appropriate expression.
It is not clear how often this is relevant; most cases seem to be handled appropriately by the simpler (type-driven) heuristics.
Real-world use cases would be especially interesting to understand the tradeoff.
Most query optimizations do not take into account whether a column (or expression) is indexed.
In most cases, the optimization can make reasonable choices by simply taking into account the type of the expressions (example: constant vs parameter vs column, ...).
In some cases (especially in the case of symmetries) information coming from the model could help choose the most appropriate expression.
It is not clear how often this is relevant; most cases seem to be handled appropriately by the simpler (type-driven) heuristics.
Real-world use cases would be especially interesting to understand the tradeoff.