1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-18 10:21:03 +03:00

Adding the "noskipscan" token to an sqlite_stat1.stat field prevents

an index for being used with the skip-scan algorithm.

FossilOrigin-Name: 4461bf045d8eecf98478035efcdba3f41c709bc5
This commit is contained in:
drh
2014-11-18 21:54:31 +00:00
6 changed files with 34 additions and 11 deletions

View File

@@ -4588,6 +4588,7 @@ static int whereLoopAddBtreeIndex(
assert( 42==sqlite3LogEst(18) );
if( saved_nEq==saved_nSkip
&& saved_nEq+1<pProbe->nKeyCol
&& pProbe->noSkipScan==0
&& pProbe->aiRowLogEst[saved_nEq+1]>=42 /* TUNING: Minimum for skip-scan */
&& (rc = whereLoopResize(db, pNew, pNew->nLTerm+1))==SQLITE_OK
){