mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-19 21:43:15 +03:00
Avoid using left-most column STAT3 samples if the left-most column has an
equality constrain and there are inequality constraints on the second column. FossilOrigin-Name: 31b4e63b3c30fcad22340d84d6076a306f26b49e
This commit is contained in:
@@ -4420,7 +4420,7 @@ static int whereLoopAddBtreeIndex(
|
||||
pNew->nOut = saved_nOut>rDiv+10 ? saved_nOut - rDiv : 10;
|
||||
}
|
||||
#ifdef SQLITE_ENABLE_STAT3
|
||||
if( pNew->u.btree.nEq==1 && pProbe->nSample
|
||||
if( pNew->u.btree.nEq==1 && pProbe->nSample && saved_nEq==0
|
||||
&& OptimizationEnabled(db, SQLITE_Stat3) ){
|
||||
tRowcnt nOut = 0;
|
||||
if( (pTerm->eOperator & (WO_EQ|WO_ISNULL))!=0 ){
|
||||
|
||||
Reference in New Issue
Block a user