diff options
author | drh <> | 2023-07-24 12:59:53 +0000 |
---|---|---|
committer | drh <> | 2023-07-24 12:59:53 +0000 |
commit | 5202b7ca75c02c59f7f74cb59598416ac107a93d (patch) | |
tree | 1034d78d2279bffbb087fec8be52b649fc24b898 /src/where.c | |
parent | 66422b57f9892262c0d5638a0c5d165658fcee43 (diff) | |
parent | 479cfd5af3d46e70468eda8e31c4d033955bdd29 (diff) | |
download | sqlite-5202b7ca75c02c59f7f74cb59598416ac107a93d.tar.gz sqlite-5202b7ca75c02c59f7f74cb59598416ac107a93d.zip |
Update the latest trunk enhancements into the wal-shm-exceptions branch.
FossilOrigin-Name: 3187ee3f69fc28a259ba0e951ac10a65c07ef2c3866acbefaf9544333a930cc6
Diffstat (limited to 'src/where.c')
-rw-r--r-- | src/where.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/where.c b/src/where.c index 858e33c8a..35b9056ff 100644 --- a/src/where.c +++ b/src/where.c @@ -5122,9 +5122,10 @@ static int wherePathSolver(WhereInfo *pWInfo, LogEst nRowEst){ /* TUNING: A full-scan of a VIEW or subquery in the outer loop ** is not so bad. */ - if( iLoop==0 && (pWLoop->wsFlags & WHERE_VIEWSCAN)!=0 ){ + if( iLoop==0 && (pWLoop->wsFlags & WHERE_VIEWSCAN)!=0 && nLoop>1 ){ rCost += -10; nOut += -30; + WHERETRACE(0x80,("VIEWSCAN cost reduction for %c\n",pWLoop->cId)); } /* Check to see if pWLoop should be added to the set of |