diff options
author | drh <drh@noemail.net> | 2013-08-01 16:52:50 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2013-08-01 16:52:50 +0000 |
commit | 788482c745e00fb416f518326b62c63420c6731c (patch) | |
tree | 71ab7966bf0dc92df472a1754ea14b2682102c89 /src | |
parent | c6fc65ce08b8f240d6476219aca855fa25aea09c (diff) | |
download | sqlite-788482c745e00fb416f518326b62c63420c6731c.tar.gz sqlite-788482c745e00fb416f518326b62c63420c6731c.zip |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/where.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/where.c b/src/where.c index 9f65d551a..8a265a928 100644 --- a/src/where.c +++ b/src/where.c @@ -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 ){ |