mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-18 10:21:03 +03:00
Fix to the decision logic for when to use the skip-ahead-distinct optimization.
FossilOrigin-Name: e50fd48969f99bc988389c53ff46714603b1d11de12c71b55c00cbee037f073c
This commit is contained in:
@@ -4858,7 +4858,8 @@ void sqlite3WhereEnd(WhereInfo *pWInfo){
|
||||
if( pWInfo->eDistinct==WHERE_DISTINCT_ORDERED
|
||||
&& (pLoop->wsFlags & WHERE_INDEXED)!=0
|
||||
&& (pIdx = pLoop->u.btree.pIndex)->hasStat1
|
||||
&& pIdx->aiRowLogEst[(n = pLoop->u.btree.nIdxCol)-1]>=36
|
||||
&& (n = pLoop->u.btree.nIdxCol)>0
|
||||
&& pIdx->aiRowLogEst[n]>=36
|
||||
){
|
||||
int r1 = pParse->nMem+1;
|
||||
int j, op;
|
||||
|
||||
Reference in New Issue
Block a user