mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-18 10:21:03 +03:00
Improvements to the WHERETRACE debugging logic.
FossilOrigin-Name: ec1e942f08548695ff02645b3f3cd6bb2516bc9a
This commit is contained in:
12
manifest
12
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.
|
C Improvements\sto\sthe\sWHERETRACE\sdebugging\slogic.
|
||||||
D 2014-10-21T01:05:09.795
|
D 2014-10-21T16:01:40.774
|
||||||
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
|
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
|
||||||
F Makefile.in cf57f673d77606ab0f2d9627ca52a9ba1464146a
|
F Makefile.in cf57f673d77606ab0f2d9627ca52a9ba1464146a
|
||||||
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
|
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
|
||||||
@@ -302,7 +302,7 @@ F src/vtab.c cb0c194303fea276b48d7d4b6d970b5a96bde8de
|
|||||||
F src/wal.c 10e7de7ce90865a68153f001a61f1d985cd17983
|
F src/wal.c 10e7de7ce90865a68153f001a61f1d985cd17983
|
||||||
F src/wal.h df01efe09c5cb8c8e391ff1715cca294f89668a4
|
F src/wal.h df01efe09c5cb8c8e391ff1715cca294f89668a4
|
||||||
F src/walker.c c253b95b4ee44b21c406e2a1052636c31ea27804
|
F src/walker.c c253b95b4ee44b21c406e2a1052636c31ea27804
|
||||||
F src/where.c 2d1ff51eede0e4dcc87569dc8e3161237295162a
|
F src/where.c 45cb63cb1422d7e5a9229c297e978d294ae51e16
|
||||||
F src/whereInt.h 4b459cdbfc9b01f5f27673a35f9967e4dea917e8
|
F src/whereInt.h 4b459cdbfc9b01f5f27673a35f9967e4dea917e8
|
||||||
F test/8_3_names.test ebbb5cd36741350040fd28b432ceadf495be25b2
|
F test/8_3_names.test ebbb5cd36741350040fd28b432ceadf495be25b2
|
||||||
F test/aggerror.test a867e273ef9e3d7919f03ef4f0e8c0d2767944f2
|
F test/aggerror.test a867e273ef9e3d7919f03ef4f0e8c0d2767944f2
|
||||||
@@ -1205,7 +1205,7 @@ F tool/vdbe_profile.tcl 67746953071a9f8f2f668b73fe899074e2c6d8c1
|
|||||||
F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
|
F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
|
||||||
F tool/warnings.sh 0abfd78ceb09b7f7c27c688c8e3fe93268a13b32
|
F tool/warnings.sh 0abfd78ceb09b7f7c27c688c8e3fe93268a13b32
|
||||||
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
|
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
|
||||||
P 19fe4a0a475bd94f491031aea7a183f7c0515cf3
|
P f4b22a2620a5dc48949048c2ecbd226755d4b2c3
|
||||||
R 7ae877aeccb485915279368cd2f54415
|
R 59b7c6284af5e31186eaa6edb85f9e59
|
||||||
U drh
|
U drh
|
||||||
Z dece11d7f7de853e09f0182395012c8f
|
Z 3eaff9a0b8f4f97b5dd119bc1e1acc8b
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
f4b22a2620a5dc48949048c2ecbd226755d4b2c3
|
ec1e942f08548695ff02645b3f3cd6bb2516bc9a
|
||||||
@@ -3995,11 +3995,15 @@ static void whereLoopAdjustCost(const WhereLoop *p, WhereLoop *pTemplate){
|
|||||||
if( whereLoopCheaperProperSubset(p, pTemplate) ){
|
if( whereLoopCheaperProperSubset(p, pTemplate) ){
|
||||||
/* Adjust pTemplate cost downward so that it is cheaper than its
|
/* Adjust pTemplate cost downward so that it is cheaper than its
|
||||||
** subset p */
|
** 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->rRun = p->rRun;
|
||||||
pTemplate->nOut = p->nOut - 1;
|
pTemplate->nOut = p->nOut - 1;
|
||||||
}else if( whereLoopCheaperProperSubset(pTemplate, p) ){
|
}else if( whereLoopCheaperProperSubset(pTemplate, p) ){
|
||||||
/* Adjust pTemplate cost upward so that it is costlier than p since
|
/* Adjust pTemplate cost upward so that it is costlier than p since
|
||||||
** pTemplate is a proper subset of p */
|
** 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->rRun = p->rRun;
|
||||||
pTemplate->nOut = p->nOut + 1;
|
pTemplate->nOut = p->nOut + 1;
|
||||||
}
|
}
|
||||||
@@ -5751,7 +5755,7 @@ static int wherePathSolver(WhereInfo *pWInfo, LogEst nRowEst){
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef WHERETRACE_ENABLED /* >=2 */
|
#ifdef WHERETRACE_ENABLED /* >=2 */
|
||||||
if( sqlite3WhereTrace>=2 ){
|
if( sqlite3WhereTrace & 0x02 ){
|
||||||
sqlite3DebugPrintf("---- after round %d ----\n", iLoop);
|
sqlite3DebugPrintf("---- after round %d ----\n", iLoop);
|
||||||
for(ii=0, pTo=aTo; ii<nTo; ii++, pTo++){
|
for(ii=0, pTo=aTo; ii<nTo; ii++, pTo++){
|
||||||
sqlite3DebugPrintf(" %s cost=%-3d nrow=%-3d order=%c",
|
sqlite3DebugPrintf(" %s cost=%-3d nrow=%-3d order=%c",
|
||||||
|
|||||||
Reference in New Issue
Block a user