You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In (ds *DataSource) DeriveStats, we first call fillIndexPath() then call Selectivity(). This means we first calculate necessary information for every index access path then in Selectivity() we'll use them. However, the information for the primary index access path of a clustered table is calculated in deriveTablePathStats(), which is after calling Selectivity().
We need to reorder this logic.
In crossValidationSelectivity(), we use the lowExclude and the highExclude from idxPointRange. But the idxPointRange may not be the range of a "point". From (coll *HistColl) getIndexRowCount, it can be a "range" (e.g. a multi-column Range where first several columns are "point" and others are "range"). So it's possible that the lowExclude and highExclude are both true, which makes the crossValidationSelectivity() wrongly return 0.
I think the simplist fix would be setting the lowExclude and the highExclude to false in crossValidationSelectivity().
The text was updated successfully, but these errors were encountered:
Enhancement
(ds *DataSource) DeriveStats
, we first callfillIndexPath()
then callSelectivity()
. This means we first calculate necessary information for every index access path then inSelectivity()
we'll use them. However, the information for the primary index access path of a clustered table is calculated inderiveTablePathStats()
, which is after callingSelectivity()
.We need to reorder this logic.
crossValidationSelectivity()
, we use thelowExclude
and thehighExclude
fromidxPointRange
. But theidxPointRange
may not be the range of a "point". From(coll *HistColl) getIndexRowCount
, it can be a "range" (e.g. a multi-columnRange
where first several columns are "point" and others are "range"). So it's possible that thelowExclude
andhighExclude
are both true, which makes thecrossValidationSelectivity()
wrongly return 0.I think the simplist fix would be setting the
lowExclude
and thehighExclude
to false incrossValidationSelectivity()
.The text was updated successfully, but these errors were encountered: