aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2016-07-29 01:32:36 +0000
committerdrh <drh@noemail.net>2016-07-29 01:32:36 +0000
commit99bbcc8287832d65fc954f29c5c340e1226292d5 (patch)
tree16b06a279a303390c7551f05e82494bc7b251baf /src
parente37f7397c97c75bc9c124564568f12253ee4533d (diff)
downloadsqlite-99bbcc8287832d65fc954f29c5c340e1226292d5.tar.gz
sqlite-99bbcc8287832d65fc954f29c5c340e1226292d5.zip
Undo some unhelpful changes to skip-scan scoring that were added
by the check-in [9e2b2681] that improved scoring of index scan. FossilOrigin-Name: c7d51934a4f30d096bb79fc509fc9dd0df5d89a4
Diffstat (limited to 'src')
-rw-r--r--src/where.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/where.c b/src/where.c
index ca406a817..da41c142f 100644
--- a/src/where.c
+++ b/src/where.c
@@ -2478,11 +2478,11 @@ static int whereLoopAddBtreeIndex(
pNew->nSkip++;
pNew->aLTerm[pNew->nLTerm++] = 0;
pNew->wsFlags |= WHERE_SKIPSCAN;
- nIter = pProbe->aiRowLogEst[saved_nEq]+1 - pProbe->aiRowLogEst[saved_nEq+1];
+ nIter = pProbe->aiRowLogEst[saved_nEq] - pProbe->aiRowLogEst[saved_nEq+1];
pNew->nOut -= nIter;
/* TUNING: Because uncertainties in the estimates for skip-scan queries,
** add a 1.375 fudge factor to make skip-scan slightly less likely. */
- nIter += 4;
+ nIter += 5;
whereLoopAddBtreeIndex(pBuilder, pSrc, pProbe, nIter + nInMul);
pNew->nOut = saved_nOut;
pNew->u.btree.nEq = saved_nEq;