-
mcy authored
ISSUE: ------ Materialization of derived tables has been delayed until it is actually required, because of this estimation of row count of derived tables can no longer be as exact as it used to be. In some cases where GROUP BY clause of Query is optimized away because all group expressions can be reduced to some constant, we can say query can produce at most one row. But we are not using this info to calculate estimated row count. This lead to inaccurate estimates and hence suboptimal plan. Fix: ---- For cases where GROUP BY CLAUSE is optimized away because all group expressions are constants set estimated_rowcount of the query to 1.
mcy authoredISSUE: ------ Materialization of derived tables has been delayed until it is actually required, because of this estimation of row count of derived tables can no longer be as exact as it used to be. In some cases where GROUP BY clause of Query is optimized away because all group expressions can be reduced to some constant, we can say query can produce at most one row. But we are not using this info to calculate estimated row count. This lead to inaccurate estimates and hence suboptimal plan. Fix: ---- For cases where GROUP BY CLAUSE is optimized away because all group expressions are constants set estimated_rowcount of the query to 1.
Loading