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: 00fe09505792cd0d104b2da9d040f023e30fa871
This commit is contained in:
drh
2014-11-15 19:08:13 +00:00
parent dd715f7c57
commit f9df2fbdcd
6 changed files with 37 additions and 11 deletions

View File

@@ -4587,6 +4587,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
){