From: drh Date: Wed, 8 May 2013 14:13:51 +0000 (+0000) Subject: Fix the wholenumber virtual table so that it returns higher costs for X-Git-Tag: version-3.8.0~130^2~86 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4f58074a8083c751c46165e367601dc95b2e1d12;p=thirdparty%2Fsqlite.git Fix the wholenumber virtual table so that it returns higher costs for unconstrained usage. FossilOrigin-Name: ceff8955020cd1314bf1ab0af7d075fe2c0863e5 --- diff --git a/ext/misc/wholenumber.c b/ext/misc/wholenumber.c index a6d79507c4..63369c6ac4 100644 --- a/ext/misc/wholenumber.c +++ b/ext/misc/wholenumber.c @@ -218,7 +218,13 @@ static int wholenumberBestIndex( ){ pIdxInfo->orderByConsumed = 1; } - pIdxInfo->estimatedCost = (double)1; + if( (idxNum & 12)==0 ){ + pIdxInfo->estimatedCost = (double)100000000; + }else if( (idxNum & 3)==0 ){ + pIdxInfo->estimatedCost = (double)5; + }else{ + pIdxInfo->estimatedCost = (double)1; + } return SQLITE_OK; } diff --git a/manifest b/manifest index 10086d2469..1b4299d8c9 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C More\sbug\sfixes\sto\sthe\sWhereLoop\sgenerator\sand\sthe\ssolver\sin\sNGQP.\nNow\sfinds\sthe\sbest\splan\sfor\sTPC-H\sQ8.\s\sThis\sseems\sto\sprove\sthe\nconcept,\sbut\sthere\sis\sstill\smuch\swork\sto\sbe\sdone. -D 2013-05-08T04:22:59.354 +C Fix\sthe\swholenumber\svirtual\stable\sso\sthat\sit\sreturns\shigher\scosts\sfor\nunconstrained\susage. +D 2013-05-08T14:13:51.196 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f F Makefile.in ce81671efd6223d19d4c8c6b88ac2c4134427111 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 @@ -90,7 +90,7 @@ F ext/misc/ieee754.c 2565ce373d842977efe0922dc50b8a41b3289556 F ext/misc/nextchar.c 1131e2b36116ffc6fe6b2e3464bfdace27978b1e F ext/misc/regexp.c c25c65fe775f5d9801fb8573e36ebe73f2c0c2e0 F ext/misc/spellfix.c f9d24a2b2617cee143b7841b453e4e1fd8f189cc -F ext/misc/wholenumber.c ce362368b9381ea48cbd951ade8df867eeeab014 +F ext/misc/wholenumber.c 784b12543d60702ebdd47da936e278aa03076212 F ext/rtree/README 6315c0d73ebf0ec40dedb5aa0e942bc8b54e3761 F ext/rtree/rtree.c 757abea591d4ff67c0ff4e8f9776aeda86b18c14 F ext/rtree/rtree.h 834dbcb82dc85b2481cde6a07cdadfddc99e9b9e @@ -1060,7 +1060,7 @@ F tool/vdbe-compress.tcl f12c884766bd14277f4fcedcae07078011717381 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4 F tool/warnings.sh fbc018d67fd7395f440c28f33ef0f94420226381 F tool/win/sqlite.vsix 97894c2790eda7b5bce3cc79cb2a8ec2fde9b3ac -P b36034bbd19bc5677b26a6f60ca96eb2b37db373 -R 133717a86de1df991cb6332a4c908d9a +P 8e5aad37529ec3042e3468acf15186f566e2df8a +R b3d674751906663b092b90a1bf5d9075 U drh -Z f247935a6bdcd4102bf6e24d9a3606bf +Z ebd03db274e88f39387d4aac452cd0be diff --git a/manifest.uuid b/manifest.uuid index f6844eb427..3eb60dca2b 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -8e5aad37529ec3042e3468acf15186f566e2df8a \ No newline at end of file +ceff8955020cd1314bf1ab0af7d075fe2c0863e5 \ No newline at end of file