diff options
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 |