Home | History | Annotate | Download | only in dist

Lines Matching full:plan

2946 ** change the query plan for a statement, then the statement may be
9377 WherePlan plan; /* query plan for this element of the FROM clause */
9388 union { /* Information that depends on plan.wsFlags */
9395 } in; /* Used when plan.wsFlags&WHERE_IN_ABLE */
35371 ** SQLITE_OK is returned if everything goes according to plan.
48462 ** EXPLAIN QUERY PLAN.
50515 ** in a better query plan.
51475 ** binding a new value to this variable invalidates the current query plan.
57857 ** by P1. The integer query plan parameter to xFilter is stored in register
58181 ** is to say when the EXPLAIN QUERY PLAN syntax is used.)
67757 ** This plan is not completely bullet-proof. It is possible for
81235 ** The implementation plan is to implement the two coroutines and seven
86286 /* If everything went according to plan, link the new VTable structure
86936 WherePlan plan; /* The lookup strategy */
86939 Bitmask used; /* Bitmask of cursors used by this plan */
88310 WhereCost *pCost /* Lowest cost query plan */
88372 pCost->plan.wsFlags = flags;
88373 pCost->plan.u.pTerm = pTerm;
88524 "table %s: xBestIndex returned an invalid plan", pTab->zName);
88554 WhereCost *pCost, /* Lowest cost query plan */
88570 pCost->plan.wsFlags = WHERE_VIRTUALTABLE;
88662 pCost->plan.u.pVtabIdx = pIdxInfo;
88664 pCost->plan.wsFlags |= WHERE_ORDERBY;
88666 pCost->plan.nEq = 0;
88922 ** Find the query plan for accessing a particular table. Write the
88923 ** best query plan and its cost into the WhereCost object supplied as the
88926 ** The lowest cost plan wins. The cost is an estimate of the amount of
88927 ** CPU and disk I/O need to process the request using the selected plan.
88940 ** named index. If no such plan is found, then the returned cost is
88941 ** SQLITE_BIG_DBL. If a plan is found that uses the named index,
88946 ** selected plan may still take advantage of the tables built-in rowid
88955 WhereCost *pCost /* Lowest cost query plan */
88965 int wsFlagMask; /* Allowed flags in pCost->plan.wsFlag */
89229 pCost->plan.wsFlags = (wsFlags&wsFlagMask);
89230 pCost->plan.nEq = nEq;
89231 pCost->plan.u.pIdx = pIdx;
89249 pCost->plan.wsFlags |= WHERE_REVERSE;
89252 assert( pOrderBy || (pCost->plan.wsFlags&WHERE_ORDERBY)==0 );
89253 assert( pCost->plan.u.pIdx==0 || (pCost->plan.wsFlags&WHERE_ROWID_EQ)==0 );
89255 || pCost->plan.u.pIdx==0
89256 || pCost->plan.u.pIdx==pSrc->pIndex
89260 (pCost->plan.u.pIdx ? pCost->plan.u.pIdx->zName : "ipk")
89264 pCost->plan.wsFlags |= eqTermMask;
89268 ** Find the query plan for accessing table pSrc->pTab. Write the
89269 ** best query plan and its cost into the WhereCost object supplied
89279 WhereCost *pCost /* Lowest cost query plan */
89412 assert( pLevel->plan.wsFlags & WHERE_IN_ABLE );
89486 int nEq = pLevel->plan.nEq; /* The number of == or IN constraints to code */
89497 assert( pLevel->plan.wsFlags & WHERE_INDEXED );
89498 pIdx = pLevel->plan.u.pIdx;
89503 nReg = pLevel->plan.nEq + nExtraReg;
89517 pTerm = findTerm(pWC, iCur, k, notReady, pLevel->plan.wsFlags, pIdx);
89580 bRev = (pLevel->plan.wsFlags & WHERE_REVERSE)!=0;
89581 omitTable = (pLevel->plan.wsFlags & WHERE_IDX_ONLY)!=0
89608 if( (pLevel->plan.wsFlags & WHERE_VIRTUALTABLE)!=0 ){
89613 sqlite3_index_info *pVtabIdx = pLevel->plan.u.pVtabIdx;
89651 if( pLevel->plan.wsFlags & WHERE_ROWID_EQ ){
89670 }else if( pLevel->plan.wsFlags & WHERE_ROWID_RANGE ){
89741 }else if( pLevel->plan.wsFlags & (WHERE_COLUMN_RANGE|WHERE_COLUMN_EQ) ){
89788 int nEq = pLevel->plan.nEq;
89804 pIdx = pLevel->plan.u.pIdx;
89817 && (pLevel->plan.wsFlags&WHERE_ORDERBY)
89829 if( pLevel->plan.wsFlags & WHERE_TOP_LIMIT ){
89833 if( pLevel->plan.wsFlags & WHERE_BTM_LIMIT ){
89941 testcase( pLevel->plan.wsFlags & WHERE_BTM_LIMIT );
89942 testcase( pLevel->plan.wsFlags & WHERE_TOP_LIMIT );
89943 if( pLevel->plan.wsFlags & (WHERE_BTM_LIMIT|WHERE_TOP_LIMIT) ){
89967 if( pLevel->plan.wsFlags & WHERE_MULTI_OR ){
90019 pTerm = pLevel->plan.u.pTerm;
90176 ** The following variable holds a text description of query plan generated
90446 WhereCost bestPlan; /* Most efficient plan seen so far */
90474 ** cost. However, this meant that SQLite could select the wrong plan
90530 if( (bestPlan.plan.wsFlags & WHERE_ORDERBY)!=0 ){
90533 andFlags &= bestPlan.plan.wsFlags;
90534 pLevel->plan = bestPlan.plan;
90535 if( bestPlan.plan.wsFlags & WHERE_INDEXED ){
90550 if( (bestPlan.plan.wsFlags & WHERE_INDEXED)==0 ){
90557 assert( bestPlan.plan.u.pIdx==pIdx );
90581 pWInfo->a[0].plan.wsFlags &= ~WHERE_IDX_ONLY;
90600 if( (pLevel->plan.wsFlags & WHERE_INDEXED)!=0 ){
90602 zMsg, pLevel->plan.u.pIdx->zName);
90603 }else if( pLevel->plan.wsFlags & WHERE_MULTI_OR ){
90605 }else if( pLevel->plan.wsFlags & (WHERE_ROWID_EQ|WHERE_ROWID_RANGE) ){
90609 else if( (pLevel->plan.wsFlags & WHERE_VIRTUALTABLE)!=0 ){
90610 sqlite3_index_info *pVtabIdx = pLevel->plan.u.pVtabIdx;
90615 if( pLevel->plan.wsFlags & WHERE_ORDERBY ){
90626 if( (pLevel->plan.wsFlags & WHERE_VIRTUALTABLE)!=0 ){
90632 if( (pLevel->plan.wsFlags & WHERE_IDX_ONLY)==0
90648 if( (pLevel->plan.wsFlags & WHERE_INDEXED)!=0 ){
90649 Index *pIx = pLevel->plan.u.pIdx;
90673 /* Record in the query plan information about the current table
90688 if( pLevel->plan.wsFlags & WHERE_IDX_ONLY ){
90697 testcase( pLevel->plan.wsFlags & WHERE_ROWID_EQ );
90698 testcase( pLevel->plan.wsFlags & WHERE_ROWID_RANGE );
90699 if( pLevel->plan.wsFlags & (WHERE_ROWID_EQ|WHERE_ROWID_RANGE) ){
90702 }else if( (pLevel->plan.wsFlags & WHERE_INDEXED)!=0 ){
90703 n = sqlite3Strlen30(pLevel->plan.u.pIdx->zName);
90705 memcpy(&sqlite3_query_plan[nQPlan], pLevel->plan.u.pIdx->zName, n);
90754 if( pLevel->plan.wsFlags & WHERE_IN_ABLE && pLevel->u.in.nIn>0 ){
90769 assert( (pLevel->plan.wsFlags & WHERE_IDX_ONLY)==0
90770 || (pLevel->plan.wsFlags & WHERE_INDEXED)!=0 );
90771 if( (pLevel->plan.wsFlags & WHERE_IDX_ONLY)==0 ){
90800 if( !pWInfo->okOnePass && (pLevel->plan.wsFlags & WHERE_IDX_ONLY)==0 ){
90803 if( (pLevel->plan.wsFlags & WHERE_INDEXED)!=0 ){
90821 if( (pLevel->plan.wsFlags & WHERE_INDEXED)!=0 && !db->mallocFailed){
90824 Index *pIdx = pLevel->plan.u.pIdx;
90839 assert( (pLevel->plan.wsFlags & WHERE_IDX_ONLY)==0
91621 26, /* PLAN => ID */
91762 "PLAN", "BEGIN", "TRANSACTION", "DEFERRED",
91839 /* 7 */ "explain ::= EXPLAIN QUERY PLAN",
92940 case 7: /* explain ::= EXPLAIN QUERY PLAN */
94547 testcase( i==73 ); /* PLAN */