-C Improvements\sto\sthe\sWHERETRACE\sdebugging\slogic.
-D 2014-10-21T16:01:40.774
+C Further\stuning\sof\sthe\scost\sestimates\sfor\sskip-scan\sloops,\sespecially\sfor\scases\nwhen\sskip-scan\sloops\sare\sin\scompetition\swith\sregular\sloops.
+D 2014-10-21T18:16:21.388
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
F Makefile.in cf57f673d77606ab0f2d9627ca52a9ba1464146a
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
F src/wal.c 10e7de7ce90865a68153f001a61f1d985cd17983
F src/wal.h df01efe09c5cb8c8e391ff1715cca294f89668a4
F src/walker.c c253b95b4ee44b21c406e2a1052636c31ea27804
-F src/where.c 45cb63cb1422d7e5a9229c297e978d294ae51e16
+F src/where.c 994b38c8697aad095878ef1e4860902df457427f
F src/whereInt.h 4b459cdbfc9b01f5f27673a35f9967e4dea917e8
F test/8_3_names.test ebbb5cd36741350040fd28b432ceadf495be25b2
F test/aggerror.test a867e273ef9e3d7919f03ef4f0e8c0d2767944f2
F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
F tool/warnings.sh 0abfd78ceb09b7f7c27c688c8e3fe93268a13b32
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
-P f4b22a2620a5dc48949048c2ecbd226755d4b2c3
-R 59b7c6284af5e31186eaa6edb85f9e59
+P ec1e942f08548695ff02645b3f3cd6bb2516bc9a
+R 4f5d15d10f268e58d7c047d490bf8adc
U drh
-Z 3eaff9a0b8f4f97b5dd119bc1e1acc8b
+Z 7d7f3f0271fe8b8df2863a2c22053442
-ec1e942f08548695ff02645b3f3cd6bb2516bc9a
\ No newline at end of file
+a27861c28c4791e51d797aa37e9cca806cb58775
\ No newline at end of file
if( (p->wsFlags & WHERE_INDEXED)==0 ) continue;
if( whereLoopCheaperProperSubset(p, pTemplate) ){
/* Adjust pTemplate cost downward so that it is cheaper than its
- ** subset p */
+ ** subset p. Except, do not adjust the cost estimate downward for
+ ** a loop that skips more columns. */
+ if( pTemplate->nSkip>p->nSkip ) continue;
WHERETRACE(0x80,("subset cost adjustment %d,%d to %d,%d\n",
pTemplate->rRun, pTemplate->nOut, p->rRun, p->nOut-1));
pTemplate->rRun = p->rRun;
pNew->aLTerm[pNew->nLTerm++] = 0;
pNew->wsFlags |= WHERE_SKIPSCAN;
nIter = pProbe->aiRowLogEst[saved_nEq] - pProbe->aiRowLogEst[saved_nEq+1];
- if( pTerm ){
- /* TUNING: When estimating skip-scan for a term that is also indexable,
- ** multiply the cost of the skip-scan by 2.0, to make it a little less
- ** desirable than the regular index lookup. */
- nIter += 10; assert( 10==sqlite3LogEst(2) );
- }
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. */