• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-12-stable/crypto/heimdal/lib/sqlite/

Lines Matching defs:plan

3399 ** WHERE clause might influence the choice of query plan for a statement,
3404 ** choice of query plan if the parameter is the left-hand side of a [LIKE]
10563 WherePlan plan; /* query plan for this element of the FROM clause */
10574 union { /* Information that depends on plan.wsFlags */
10581 } in; /* Used when plan.wsFlags&WHERE_IN_ABLE */
41605 ** SQLITE_OK is returned if everything goes according to plan. An
61534 ** in a better query plan.
62557 ** binding a new value to this variable invalidates the current query plan.
62560 ** parameter in the WHERE clause might influence the choice of query plan
69349 ** by P1. The integer query plan parameter to xFilter is stored in register
80434 ** This plan is not completely bullet-proof. It is possible for
94465 ** The implementation plan is to implement the two coroutines and seven
99776 /* If everything went according to plan, link the new VTable structure
100544 WherePlan plan; /* The lookup strategy */
100546 Bitmask used; /* Bitmask of cursors used by this plan */
102141 WhereCost *pCost /* Lowest cost query plan */
102189 nRow += sTermCost.plan.nRow;
102209 pCost->plan.nRow = nRow;
102210 pCost->plan.wsFlags = flags;
102211 pCost->plan.u.pTerm = pTerm;
102241 ** If the query plan for pSrc specified in pCost is a full table scan
102245 ** is taken into account, then alter the query plan to use the
102253 WhereCost *pCost /* Lowest cost query plan */
102270 if( (pCost->plan.wsFlags & WHERE_NOT_FULLSCAN)!=0 ){
102301 pCost->plan.nRow = logN + 1;
102302 pCost->plan.wsFlags = WHERE_TEMP_INDEX;
102371 pLevel->plan.nEq = nColumn;
102391 pLevel->plan.wsFlags |= WHERE_COLUMN_EQ | WHERE_IDX_ONLY | WO_EQ;
102400 pLevel->plan.u.pIdx = pIdx;
102423 assert( (u32)n==pLevel->plan.nEq );
102612 "table %s: xBestIndex returned an invalid plan", pTab->zName);
102643 WhereCost *pCost, /* Lowest cost query plan */
102660 pCost->plan.wsFlags = WHERE_VIRTUALTABLE;
102761 pCost->plan.u.pVtabIdx = pIdxInfo;
102763 pCost->plan.wsFlags |= WHERE_ORDERBY;
102765 pCost->plan.nEq = 0;
103180 ** Find the best query plan for accessing a particular table. Write the
103181 ** best query plan and its cost into the WhereCost object supplied as the
103184 ** The lowest cost plan wins. The cost is an estimate of the amount of
103198 ** named index. If no such plan is found, then the returned cost is
103199 ** SQLITE_BIG_DBL. If a plan is found that uses the named index,
103204 ** selected plan may still take advantage of the built-in rowid primary key
103215 WhereCost *pCost /* Lowest cost query plan */
103225 int wsFlagMask; /* Allowed flags in pCost->plan.wsFlag */
103628 && (cost<pCost->rCost || (cost<=pCost->rCost && nRow<pCost->plan.nRow))
103632 pCost->plan.nRow = nRow;
103633 pCost->plan.wsFlags = (wsFlags&wsFlagMask);
103634 pCost->plan.nEq = nEq;
103635 pCost->plan.u.pIdx = pIdx;
103653 pCost->plan.wsFlags |= WHERE_REVERSE;
103656 assert( pOrderBy || (pCost->plan.wsFlags&WHERE_ORDERBY)==0 );
103657 assert( pCost->plan.u.pIdx==0 || (pCost->plan.wsFlags&WHERE_ROWID_EQ)==0 );
103659 || pCost->plan.u.pIdx==0
103660 || pCost->plan.u.pIdx==pSrc->pIndex
103664 ((pCost->plan.wsFlags & WHERE_NOT_FULLSCAN)==0 ? "none" :
103665 pCost->plan.u.pIdx ? pCost->plan.u.pIdx->zName : "ipk")
103670 pCost->plan.wsFlags |= eqTermMask;
103674 ** Find the query plan for accessing table pSrc->pTab. Write the
103675 ** best query plan and its cost into the WhereCost object supplied
103686 WhereCost *pCost /* Lowest cost query plan */
103822 assert( pLevel->plan.wsFlags & WHERE_IN_ABLE );
103896 int nEq = pLevel->plan.nEq; /* The number of == or IN constraints to code */
103907 assert( pLevel->plan.wsFlags & WHERE_INDEXED );
103908 pIdx = pLevel->plan.u.pIdx;
103913 nReg = pLevel->plan.nEq + nExtraReg;
103927 pTerm = findTerm(pWC, iCur, k, notReady, pLevel->plan.wsFlags, pIdx);
104002 WherePlan *pPlan = &pLevel->plan;
104046 u32 flags = pLevel->plan.wsFlags;
104057 isSearch = (pLevel->plan.nEq>0)
104077 ((flags & WHERE_TEMP_INDEX)?"": pLevel->plan.u.pIdx->zName),
104096 sqlite3_index_info *pVtabIdx = pLevel->plan.u.pVtabIdx;
104105 nRow = (sqlite3_int64)pLevel->plan.nRow;
104148 bRev = (pLevel->plan.wsFlags & WHERE_REVERSE)!=0;
104149 omitTable = (pLevel->plan.wsFlags & WHERE_IDX_ONLY)!=0
104176 if( (pLevel->plan.wsFlags & WHERE_VIRTUALTABLE)!=0 ){
104181 sqlite3_index_info *pVtabIdx = pLevel->plan.u.pVtabIdx;
104219 if( pLevel->plan.wsFlags & WHERE_ROWID_EQ ){
104239 }else if( pLevel->plan.wsFlags & WHERE_ROWID_RANGE ){
104316 }else if( pLevel->plan.wsFlags & (WHERE_COLUMN_RANGE|WHERE_COLUMN_EQ) ){
104363 int nEq = pLevel->plan.nEq; /* Number of == or IN terms */
104380 pIdx = pLevel->plan.u.pIdx;
104393 && (pLevel->plan.wsFlags&WHERE_ORDERBY)
104405 if( pLevel->plan.wsFlags & WHERE_TOP_LIMIT ){
104409 if( pLevel->plan.wsFlags & WHERE_BTM_LIMIT ){
104525 testcase( pLevel->plan.wsFlags & WHERE_BTM_LIMIT );
104526 testcase( pLevel->plan.wsFlags & WHERE_TOP_LIMIT );
104527 if( (pLevel->plan.wsFlags & (WHERE_BTM_LIMIT|WHERE_TOP_LIMIT))!=0 ){
104546 if( pLevel->plan.wsFlags & WHERE_UNIQUE ){
104557 if( pLevel->plan.wsFlags & WHERE_MULTI_OR ){
104608 pTerm = pLevel->plan.u.pTerm;
104769 ** The following variable holds a text description of query plan generated
104795 if( pWInfo->a[i].plan.wsFlags & WHERE_TEMP_INDEX ){
104796 Index *pIdx = pWInfo->a[i].plan.u.pIdx;
105062 WhereCost bestPlan; /* Most efficient plan seen so far */
105088 ** its query plan, then checking to see if that query plan uses any
105090 ** used then the "optimal" query plan works.
105104 ** cost. However, this meant that SQLite could select the wrong plan
105156 /* If an INDEXED BY clause is present, then the plan must use that
105159 || (sCost.plan.wsFlags & WHERE_NOT_FULLSCAN)==0
105160 || sCost.plan.u.pIdx==pTabItem->pIndex );
105162 if( isOptimal && (sCost.plan.wsFlags & WHERE_NOT_FULLSCAN)==0 ){
105171 ** (2) A full-table-scan plan cannot supercede indexed plan unless
105172 ** the full-table-scan is an "optimal" plan as defined above.
105183 ** (4) The plan cost must be lower than prior plans or else the
105188 || (bestPlan.plan.wsFlags & WHERE_NOT_FULLSCAN)==0
105189 || (sCost.plan.wsFlags & WHERE_NOT_FULLSCAN)!=0)
105191 || NEVER((sCost.plan.wsFlags & WHERE_NOT_FULLSCAN)!=0))
105194 && sCost.plan.nRow<bestPlan.plan.nRow))
105198 j, sCost.rCost, sCost.plan.nRow));
105209 bestJ, pLevel-pWInfo->a, bestPlan.rCost, bestPlan.plan.nRow));
105210 if( (bestPlan.plan.wsFlags & WHERE_ORDERBY)!=0 ){
105213 if( (bestPlan.plan.wsFlags & WHERE_DISTINCT)!=0 ){
105217 andFlags &= bestPlan.plan.wsFlags;
105218 pLevel->plan = bestPlan.plan;
105219 testcase( bestPlan.plan.wsFlags & WHERE_INDEXED );
105220 testcase( bestPlan.plan.wsFlags & WHERE_TEMP_INDEX );
105221 if( bestPlan.plan.wsFlags & (WHERE_INDEXED|WHERE_TEMP_INDEX) ){
105228 if( bestPlan.plan.nRow>=(double)1 ){
105229 pParse->nQueryLoop *= bestPlan.plan.nRow;
105239 if( (bestPlan.plan.wsFlags & WHERE_INDEXED)==0 ){
105246 assert( bestPlan.plan.u.pIdx==pIdx );
105270 pWInfo->a[0].plan.wsFlags &= ~WHERE_IDX_ONLY;
105286 pWInfo->nRowOut *= pLevel->plan.nRow;
105292 if( (pLevel->plan.wsFlags & WHERE_VIRTUALTABLE)!=0 ){
105298 if( (pLevel->plan.wsFlags & WHERE_IDX_ONLY)==0
105316 if( (pLevel->plan.wsFlags & WHERE_TEMP_INDEX)!=0 ){
105320 if( (pLevel->plan.wsFlags & WHERE_INDEXED)!=0 ){
105321 Index *pIx = pLevel->plan.u.pIdx;
105349 /* Record in the query plan information about the current table
105364 if( pLevel->plan.wsFlags & WHERE_IDX_ONLY ){
105373 testcase( pLevel->plan.wsFlags & WHERE_ROWID_EQ );
105374 testcase( pLevel->plan.wsFlags & WHERE_ROWID_RANGE );
105375 if( pLevel->plan.wsFlags & (WHERE_ROWID_EQ|WHERE_ROWID_RANGE) ){
105378 }else if( (pLevel->plan.wsFlags & WHERE_INDEXED)!=0 ){
105379 n = sqlite3Strlen30(pLevel->plan.u.pIdx->zName);
105381 memcpy(&sqlite3_query_plan[nQPlan], pLevel->plan.u.pIdx->zName, n);
105433 if( pLevel->plan.wsFlags & WHERE_IN_ABLE && pLevel->u.in.nIn>0 ){
105448 assert( (pLevel->plan.wsFlags & WHERE_IDX_ONLY)==0
105449 || (pLevel->plan.wsFlags & WHERE_INDEXED)!=0 );
105450 if( (pLevel->plan.wsFlags & WHERE_IDX_ONLY)==0 ){
105481 int ws = pLevel->plan.wsFlags;
105503 if( (pLevel->plan.wsFlags & WHERE_INDEXED)!=0 && !db->mallocFailed){
105506 Index *pIdx = pLevel->plan.u.pIdx;
105521 assert( (pLevel->plan.wsFlags & WHERE_IDX_ONLY)==0