• Home
  • Raw
  • Download

Lines Matching refs:pTemplate

132474 static void whereLoopAdjustCost(const WhereLoop *p, WhereLoop *pTemplate){
132475 if( (pTemplate->wsFlags & WHERE_INDEXED)==0 ) return;
132477 if( p->iTab!=pTemplate->iTab ) continue;
132479 if( whereLoopCheaperProperSubset(p, pTemplate) ){
132483 pTemplate->rRun, pTemplate->nOut, p->rRun, p->nOut-1));
132484 pTemplate->rRun = p->rRun;
132485 pTemplate->nOut = p->nOut - 1;
132486 }else if( whereLoopCheaperProperSubset(pTemplate, p) ){
132490 pTemplate->rRun, pTemplate->nOut, p->rRun, p->nOut+1));
132491 pTemplate->rRun = p->rRun;
132492 pTemplate->nOut = p->nOut + 1;
132512 const WhereLoop *pTemplate
132516 if( p->iTab!=pTemplate->iTab || p->iSortIdx!=pTemplate->iSortIdx ){
132525 assert( p->rSetup==0 || pTemplate->rSetup==0
132526 || p->rSetup==pTemplate->rSetup );
132531 assert( p->rSetup>=pTemplate->rSetup );
132537 && (pTemplate->nSkip)==0
132538 && (pTemplate->wsFlags & WHERE_INDEXED)!=0
132539 && (pTemplate->wsFlags & WHERE_COLUMN_EQ)!=0
132540 && (p->prereq & pTemplate->prereq)==pTemplate->prereq
132550 if( (p->prereq & pTemplate->prereq)==p->prereq /* (1) */
132551 && p->rSetup<=pTemplate->rSetup /* (2a) */
132552 && p->rRun<=pTemplate->rRun /* (2b) */
132553 && p->nOut<=pTemplate->nOut /* (2c) */
132563 if( (p->prereq & pTemplate->prereq)==pTemplate->prereq /* (1) */
132564 && p->rRun>=pTemplate->rRun /* (2a) */
132565 && p->nOut>=pTemplate->nOut /* (2b) */
132567 assert( p->rSetup>=pTemplate->rSetup ); /* SETUP-INVARIANT above */
132598 static int whereLoopInsert(WhereLoopBuilder *pBuilder, WhereLoop *pTemplate){
132608 if( pTemplate->nLTerm ){
132613 whereOrInsert(pBuilder->pOrSet, pTemplate->prereq, pTemplate->rRun,
132614 pTemplate->nOut);
132618 whereLoopPrint(pTemplate, pBuilder->pWC);
132627 whereLoopAdjustCost(pWInfo->pLoops, pTemplate);
132628 ppPrev = whereLoopFindLesser(&pWInfo->pLoops, pTemplate);
132636 whereLoopPrint(pTemplate, pBuilder->pWC);
132655 whereLoopPrint(pTemplate, pBuilder->pWC);
132671 ppTail = whereLoopFindLesser(ppTail, pTemplate);
132685 rc = whereLoopXfer(db, p, pTemplate);