]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Improvements to the WHERETRACE debugging logic.
authordrh <drh@noemail.net>
Tue, 21 Oct 2014 16:01:40 +0000 (16:01 +0000)
committerdrh <drh@noemail.net>
Tue, 21 Oct 2014 16:01:40 +0000 (16:01 +0000)
FossilOrigin-Name: ec1e942f08548695ff02645b3f3cd6bb2516bc9a

manifest
manifest.uuid
src/where.c

index 3c0097dfe932f21c2df3b38d773580e9834769b0..d708dca4f31e19e931bcef865eab441e5554fded 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C If\sa\sskip-scan\sis\sa\sproper\ssubset\sof\ssome\sother\sscan,\sthen\sadjust\sthe\ncost\sof\sthe\sskip-scan\supward\sso\sthat\sit\sis\smore\scostly\sthan\sthe\sother\sscan.\nSuch\sa\scost\simbalance\scan\sarise\sunder\sSTAT4\sbecause\sof\sdifficulties\sin\sgetting\nan\saccurate\sestimate\sfor\sskip-scans.
-D 2014-10-21T01:05:09.795
+C Improvements\sto\sthe\sWHERETRACE\sdebugging\slogic.
+D 2014-10-21T16:01:40.774
 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
 F Makefile.in cf57f673d77606ab0f2d9627ca52a9ba1464146a
 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
@@ -302,7 +302,7 @@ F src/vtab.c cb0c194303fea276b48d7d4b6d970b5a96bde8de
 F src/wal.c 10e7de7ce90865a68153f001a61f1d985cd17983
 F src/wal.h df01efe09c5cb8c8e391ff1715cca294f89668a4
 F src/walker.c c253b95b4ee44b21c406e2a1052636c31ea27804
-F src/where.c 2d1ff51eede0e4dcc87569dc8e3161237295162a
+F src/where.c 45cb63cb1422d7e5a9229c297e978d294ae51e16
 F src/whereInt.h 4b459cdbfc9b01f5f27673a35f9967e4dea917e8
 F test/8_3_names.test ebbb5cd36741350040fd28b432ceadf495be25b2
 F test/aggerror.test a867e273ef9e3d7919f03ef4f0e8c0d2767944f2
@@ -1205,7 +1205,7 @@ F tool/vdbe_profile.tcl 67746953071a9f8f2f668b73fe899074e2c6d8c1
 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
 F tool/warnings.sh 0abfd78ceb09b7f7c27c688c8e3fe93268a13b32
 F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
-P 19fe4a0a475bd94f491031aea7a183f7c0515cf3
-R 7ae877aeccb485915279368cd2f54415
+P f4b22a2620a5dc48949048c2ecbd226755d4b2c3
+R 59b7c6284af5e31186eaa6edb85f9e59
 U drh
-Z dece11d7f7de853e09f0182395012c8f
+Z 3eaff9a0b8f4f97b5dd119bc1e1acc8b
index ee9b76f6028718b7948eb77be3f84bb0ef59688c..838729f6987d7e1755c871ede7057075037ab112 100644 (file)
@@ -1 +1 @@
-f4b22a2620a5dc48949048c2ecbd226755d4b2c3
\ No newline at end of file
+ec1e942f08548695ff02645b3f3cd6bb2516bc9a
\ No newline at end of file
index 00b18808803c384229a8a9716f346e8dc32def29..7dfe0f02bbf0b7b4689f49430f91a5fe6e47d443 100644 (file)
@@ -3995,11 +3995,15 @@ static void whereLoopAdjustCost(const WhereLoop *p, WhereLoop *pTemplate){
     if( whereLoopCheaperProperSubset(p, pTemplate) ){
       /* Adjust pTemplate cost downward so that it is cheaper than its 
       ** subset p */
+      WHERETRACE(0x80,("subset cost adjustment %d,%d to %d,%d\n",
+                       pTemplate->rRun, pTemplate->nOut, p->rRun, p->nOut-1));
       pTemplate->rRun = p->rRun;
       pTemplate->nOut = p->nOut - 1;
     }else if( whereLoopCheaperProperSubset(pTemplate, p) ){
       /* Adjust pTemplate cost upward so that it is costlier than p since
       ** pTemplate is a proper subset of p */
+      WHERETRACE(0x80,("subset cost adjustment %d,%d to %d,%d\n",
+                       pTemplate->rRun, pTemplate->nOut, p->rRun, p->nOut+1));
       pTemplate->rRun = p->rRun;
       pTemplate->nOut = p->nOut + 1;
     }
@@ -5751,7 +5755,7 @@ static int wherePathSolver(WhereInfo *pWInfo, LogEst nRowEst){
     }
 
 #ifdef WHERETRACE_ENABLED  /* >=2 */
-    if( sqlite3WhereTrace>=2 ){
+    if( sqlite3WhereTrace & 0x02 ){
       sqlite3DebugPrintf("---- after round %d ----\n", iLoop);
       for(ii=0, pTo=aTo; ii<nTo; ii++, pTo++){
         sqlite3DebugPrintf(" %s cost=%-3d nrow=%-3d order=%c",