/ Check-in [ceff8955]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix the wholenumber virtual table so that it returns higher costs for unconstrained usage.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | nextgen-query-plan-exp
Files: files | file ages | folders
SHA1:ceff8955020cd1314bf1ab0af7d075fe2c0863e5
User & Date: drh 2013-05-08 14:13:51
References
2013-05-08
14:20
Fix the wholenumber virtual table so that it returns higher costs for unconstrained usage. Cherrypick from [ceff8955020cd13]. check-in: 7227b615 user: drh tags: trunk
Context
2013-05-08
14:20
Fix the wholenumber virtual table so that it returns higher costs for unconstrained usage. Cherrypick from [ceff8955020cd13]. check-in: 7227b615 user: drh tags: trunk
14:14
NGQP working with virtual tables, though many legacy tests fail and there are yet some memory leaks. check-in: bd9327a9 user: drh tags: nextgen-query-plan-exp
14:13
Fix the wholenumber virtual table so that it returns higher costs for unconstrained usage. check-in: ceff8955 user: drh tags: nextgen-query-plan-exp
04:22
More bug fixes to the WhereLoop generator and the solver in NGQP. Now finds the best plan for TPC-H Q8. This seems to prove the concept, but there is still much work to be done. check-in: 8e5aad37 user: drh tags: nextgen-query-plan-exp
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to ext/misc/wholenumber.c.

   214    214       pIdxInfo->aConstraintUsage[gtIdx].omit = 1;
   215    215     }
   216    216     if( pIdxInfo->nOrderBy==1
   217    217      && pIdxInfo->aOrderBy[0].desc==0
   218    218     ){
   219    219       pIdxInfo->orderByConsumed = 1;
   220    220     }
   221         -  pIdxInfo->estimatedCost = (double)1;
          221  +  if( (idxNum & 12)==0 ){
          222  +    pIdxInfo->estimatedCost = (double)100000000;
          223  +  }else if( (idxNum & 3)==0 ){
          224  +    pIdxInfo->estimatedCost = (double)5;
          225  +  }else{
          226  +    pIdxInfo->estimatedCost = (double)1;
          227  +  }
   222    228     return SQLITE_OK;
   223    229   }
   224    230   
   225    231   /*
   226    232   ** A virtual table module that provides read-only access to a
   227    233   ** Tcl global variable namespace.
   228    234   */