diff options
author | drh <drh@noemail.net> | 2014-10-22 15:27:05 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2014-10-22 15:27:05 +0000 |
commit | 9f07cf7b2e43548f60bd7497dafba30856df3531 (patch) | |
tree | e95a44e53867012ea9474ae74c87195557a9119d /src/analyze.c | |
parent | 442c5cd3cfc67d3e10aa64d9f180ef94fb3597cf (diff) | |
download | sqlite-9f07cf7b2e43548f60bd7497dafba30856df3531.tar.gz sqlite-9f07cf7b2e43548f60bd7497dafba30856df3531.zip |
Take steps to avoid misestimating range query costs based on STAT4 data
due to the roundoff error of converting from integers to LogEst and back
to integers.
FossilOrigin-Name: 3c933bf95f291f7957580d823dce92c981375a5c
Diffstat (limited to 'src/analyze.c')
-rw-r--r-- | src/analyze.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/analyze.c b/src/analyze.c index 7d36f0131..67bba1a28 100644 --- a/src/analyze.c +++ b/src/analyze.c @@ -1599,6 +1599,7 @@ static void initAvgEq(Index *pIdx){ nRow = pIdx->aiRowEst[0]; nDist100 = ((i64)100 * pIdx->aiRowEst[0]) / pIdx->aiRowEst[iCol+1]; } + pIdx->nRowEst0 = nRow; /* Set nSum to the number of distinct (iCol+1) field prefixes that ** occur in the stat4 table for this index. Set sumEq to the sum of |