mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-18 10:21:03 +03:00
Disallow the skip-scan optimization in the absence of sqlite_stat1 data.
FossilOrigin-Name: e0c6b8bdb76fcd4f08c89ff20dce6a33ef3c11752e1e919fec5c4e7d423c4b93
This commit is contained in:
@@ -2732,6 +2732,7 @@ static int whereLoopAddBtreeIndex(
|
||||
&& saved_nEq+1<pProbe->nKeyCol
|
||||
&& saved_nEq==pNew->nLTerm
|
||||
&& pProbe->noSkipScan==0
|
||||
&& pProbe->hasStat1!=0
|
||||
&& OptimizationEnabled(db, SQLITE_SkipScan)
|
||||
&& pProbe->aiRowLogEst[saved_nEq+1]>=42 /* TUNING: Minimum for skip-scan */
|
||||
&& (rc = whereLoopResize(db, pNew, pNew->nLTerm+1))==SQLITE_OK
|
||||
|
||||
Reference in New Issue
Block a user