aboutsummaryrefslogtreecommitdiff
path: root/src/where.c
diff options
context:
space:
mode:
authordrh <>2023-07-19 10:17:42 +0000
committerdrh <>2023-07-19 10:17:42 +0000
commit47079b19dfae85cba60a5c976d258b4ce6405d6c (patch)
treebd248d8345ad2feba137eb8e6059070b5f8e97b2 /src/where.c
parentd1db37a2f32b06d0cd53e66b18ee47ffea91ca87 (diff)
parent37fd50df1fdf67ba2d46dab956b921d14ad956be (diff)
downloadsqlite-47079b19dfae85cba60a5c976d258b4ce6405d6c.tar.gz
sqlite-47079b19dfae85cba60a5c976d258b4ce6405d6c.zip
Merge the latest trunk enhancements into the sqlite3_stmt_explain branch.
FossilOrigin-Name: 06eae046c1a1155f22590b88942db72f01482f2363da9753f8adfdb322679055
Diffstat (limited to 'src/where.c')
-rw-r--r--src/where.c3
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