]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Fix the wholenumber virtual table so that it returns higher costs for
authordrh <drh@noemail.net>
Wed, 8 May 2013 14:13:51 +0000 (14:13 +0000)
committerdrh <drh@noemail.net>
Wed, 8 May 2013 14:13:51 +0000 (14:13 +0000)
unconstrained usage.

FossilOrigin-Name: ceff8955020cd1314bf1ab0af7d075fe2c0863e5

ext/misc/wholenumber.c
manifest
manifest.uuid

index a6d79507c41a2994ac3d229fc3c7deab540cf3c1..63369c6ac474e1cae1b4309f78536166ebc716a5 100644 (file)
@@ -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;
 }
 
index 10086d24690220a350993a32c93840bd7eef41cc..1b4299d8c9de2d1986ea7972ef60a84562e88fc3 100644 (file)
--- 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
index f6844eb427d2b870f428e23046ceca141bb389c0..3eb60dca2b6934f8734217ee3bcd238a78eb3d04 100644 (file)
@@ -1 +1 @@
-8e5aad37529ec3042e3468acf15186f566e2df8a
\ No newline at end of file
+ceff8955020cd1314bf1ab0af7d075fe2c0863e5
\ No newline at end of file