Lines Matching refs:pProbe
2787 Index *pProbe, /* An index on pSrc */ in whereLoopAddBtreeIndex() argument
2813 pProbe->pTable->zName,pProbe->zName, in whereLoopAddBtreeIndex()
2824 if( pProbe->bUnordered ) opMask &= ~(WO_GT|WO_GE|WO_LT|WO_LE); in whereLoopAddBtreeIndex()
2826 assert( pNew->u.btree.nEq<pProbe->nColumn ); in whereLoopAddBtreeIndex()
2827 assert( pNew->u.btree.nEq<pProbe->nKeyCol in whereLoopAddBtreeIndex()
2828 || pProbe->idxType!=SQLITE_IDXTYPE_PRIMARYKEY ); in whereLoopAddBtreeIndex()
2839 opMask, pProbe); in whereLoopAddBtreeIndex()
2841 rSize = pProbe->aiRowLogEst[0]; in whereLoopAddBtreeIndex()
2852 && indexColumnNotNull(pProbe, saved_nEq) in whereLoopAddBtreeIndex()
2867 if( IsUniqueIndex(pProbe) && saved_nEq==pProbe->nKeyCol-1 ){ in whereLoopAddBtreeIndex()
2910 if( pProbe->hasStat1 && rLogSize>=10 ){ in whereLoopAddBtreeIndex()
2932 M = pProbe->aiRowLogEst[saved_nEq]; in whereLoopAddBtreeIndex()
2957 int iCol = pProbe->aiColumn[saved_nEq]; in whereLoopAddBtreeIndex()
2961 || (iCol>=0 && nInMul==0 && saved_nEq==pProbe->nKeyCol-1) in whereLoopAddBtreeIndex()
2963 if( iCol==XN_ROWID || pProbe->uniqNotNull in whereLoopAddBtreeIndex()
2964 || (pProbe->nKeyCol==1 && pProbe->onError && eOp==WO_EQ) in whereLoopAddBtreeIndex()
2976 pParse, pSrc->iCursor, pProbe, saved_nEq, pTerm in whereLoopAddBtreeIndex()
3024 if( pTerm->truthProb<=0 && pProbe->aiColumn[saved_nEq]>=0 ){ in whereLoopAddBtreeIndex()
3033 && pProbe->nSample in whereLoopAddBtreeIndex()
3034 && ALWAYS(pNew->u.btree.nEq<=pProbe->nSampleCol) in whereLoopAddBtreeIndex()
3055 && pNew->nOut+10 > pProbe->aiRowLogEst[0] in whereLoopAddBtreeIndex()
3079 pNew->nOut += (pProbe->aiRowLogEst[nEq] - pProbe->aiRowLogEst[nEq-1]); in whereLoopAddBtreeIndex()
3095 rCostIdx = pNew->nOut + 1 + (15*pProbe->szIdxRow)/pSrc->pTab->szTabRow; in whereLoopAddBtreeIndex()
3100 ApplyCostMultiplier(pNew->rRun, pProbe->pTable->costMult); in whereLoopAddBtreeIndex()
3115 && pNew->u.btree.nEq<pProbe->nColumn in whereLoopAddBtreeIndex()
3116 && (pNew->u.btree.nEq<pProbe->nKeyCol || in whereLoopAddBtreeIndex()
3117 pProbe->idxType!=SQLITE_IDXTYPE_PRIMARYKEY) in whereLoopAddBtreeIndex()
3119 whereLoopAddBtreeIndex(pBuilder, pSrc, pProbe, nInMul+nIn); in whereLoopAddBtreeIndex()
3147 && saved_nEq+1<pProbe->nKeyCol in whereLoopAddBtreeIndex()
3149 && pProbe->noSkipScan==0 in whereLoopAddBtreeIndex()
3150 && pProbe->hasStat1!=0 in whereLoopAddBtreeIndex()
3152 && pProbe->aiRowLogEst[saved_nEq+1]>=42 /* TUNING: Minimum for skip-scan */ in whereLoopAddBtreeIndex()
3160 nIter = pProbe->aiRowLogEst[saved_nEq] - pProbe->aiRowLogEst[saved_nEq+1]; in whereLoopAddBtreeIndex()
3165 whereLoopAddBtreeIndex(pBuilder, pSrc, pProbe, nIter + nInMul); in whereLoopAddBtreeIndex()
3173 pProbe->pTable->zName, pProbe->zName, saved_nEq, rc)); in whereLoopAddBtreeIndex()
3379 Index *pProbe; /* An index we are evaluating */ in whereLoopAddBtree() local
3404 pProbe = pSrc->u2.pIBIndex; in whereLoopAddBtree()
3406 pProbe = pTab->pIndex; in whereLoopAddBtree()
3430 pProbe = &sPk; in whereLoopAddBtree()
3491 for(; rc==SQLITE_OK && pProbe; in whereLoopAddBtree()
3492 pProbe=(pSrc->fg.isIndexedBy ? 0 : pProbe->pNext), iSortIdx++ in whereLoopAddBtree()
3494 if( pProbe->pPartIdxWhere!=0 in whereLoopAddBtree()
3496 pProbe->pPartIdxWhere) in whereLoopAddBtree()
3501 if( pProbe->bNoQuery ) continue; in whereLoopAddBtree()
3502 rSize = pProbe->aiRowLogEst[0]; in whereLoopAddBtree()
3512 pNew->u.btree.pIndex = pProbe; in whereLoopAddBtree()
3513 b = indexMightHelpWithOrderBy(pBuilder, pProbe, pSrc->iCursor); in whereLoopAddBtree()
3517 if( pProbe->idxType==SQLITE_IDXTYPE_IPK ){ in whereLoopAddBtree()
3550 if( pProbe->isCovering ){ in whereLoopAddBtree()
3554 m = pSrc->colUsed & pProbe->colNotIdxed; in whereLoopAddBtree()
3556 m = whereIsCoveringIndex(pWInfo, pProbe, pSrc->iCursor); in whereLoopAddBtree()
3564 || pProbe->pPartIdxWhere!=0 in whereLoopAddBtree()
3567 && pProbe->bUnordered==0 in whereLoopAddBtree()
3568 && (pProbe->szIdxRow<pTab->szTabRow) in whereLoopAddBtree()
3579 pNew->rRun = rSize + 1 + (15*pProbe->szIdxRow)/pTab->szTabRow; in whereLoopAddBtree()
3592 if( !sqlite3ExprCoveredByIndex(pTerm->pExpr, iCur, pProbe) ){ in whereLoopAddBtree()
3609 if( (pSrc->fg.jointype & JT_RIGHT)!=0 && pProbe->aColExpr ){ in whereLoopAddBtree()
3623 rc = whereLoopAddBtreeIndex(pBuilder, pSrc, pProbe, 0); in whereLoopAddBtree()