/ Check-in [ceff8955]
Login
SQLite training in Houston TX on 2019-11-05 (details)
Part of the 2019 Tcl Conference

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 Unified Diffs Ignore Whitespace Patch

Changes to ext/misc/wholenumber.c.

214
215
216
217
218
219
220





221

222
223
224
225
226
227
228
    pIdxInfo->aConstraintUsage[gtIdx].omit = 1;
  }
  if( pIdxInfo->nOrderBy==1
   && pIdxInfo->aOrderBy[0].desc==0
  ){
    pIdxInfo->orderByConsumed = 1;
  }





  pIdxInfo->estimatedCost = (double)1;

  return SQLITE_OK;
}

/*
** A virtual table module that provides read-only access to a
** Tcl global variable namespace.
*/







>
>
>
>
>
|
>







214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
    pIdxInfo->aConstraintUsage[gtIdx].omit = 1;
  }
  if( pIdxInfo->nOrderBy==1
   && pIdxInfo->aOrderBy[0].desc==0
  ){
    pIdxInfo->orderByConsumed = 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;
}

/*
** A virtual table module that provides read-only access to a
** Tcl global variable namespace.
*/