Lines Matching refs:pIndex
629 for(pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext){ in isDistinctRedundant()
925 pLoop->u.btree.pIndex = pIdx; in constructAutomaticIndex()
1120 Index *pIdx = pLoop->u.btree.pIndex; in sqlite3ConstructBloomFilter()
1696 Index *p = pLoop->u.btree.pIndex; in whereRangeSkipScanEst()
1813 Index *p = pLoop->u.btree.pIndex; in whereRangeScanEst()
1988 Index *p = pBuilder->pNew->u.btree.pIndex; in whereEqualScanEst()
2052 Index *p = pBuilder->pNew->u.btree.pIndex; in whereInScanEst()
2153 if( p->u.btree.pIndex && (zName = p->u.btree.pIndex->zName)!=0 ){ in sqlite3WhereLoopPrint()
2209 }else if( (p->wsFlags & WHERE_AUTO_INDEX)!=0 && p->u.btree.pIndex!=0 ){ in whereLoopClearUnion()
2210 sqlite3DbFree(db, p->u.btree.pIndex->zColAff); in whereLoopClearUnion()
2211 sqlite3DbFreeNN(db, p->u.btree.pIndex); in whereLoopClearUnion()
2212 p->u.btree.pIndex = 0; in whereLoopClearUnion()
2264 pFrom->u.btree.pIndex = 0; in whereLoopXfer()
2584 Index *pIndex = p->u.btree.pIndex; in whereLoopInsert() local
2585 if( pIndex && pIndex->idxType==SQLITE_IDXTYPE_IPK ){ in whereLoopInsert()
2586 p->u.btree.pIndex = 0; in whereLoopInsert()
3187 Index *pIndex, in indexMightHelpWithOrderBy() argument
3194 if( pIndex->bUnordered ) return 0; in indexMightHelpWithOrderBy()
3201 for(jj=0; jj<pIndex->nKeyCol; jj++){ in indexMightHelpWithOrderBy()
3202 if( pExpr->iColumn==pIndex->aiColumn[jj] ) return 1; in indexMightHelpWithOrderBy()
3204 }else if( (aColExpr = pIndex->aColExpr)!=0 ){ in indexMightHelpWithOrderBy()
3205 for(jj=0; jj<pIndex->nKeyCol; jj++){ in indexMightHelpWithOrderBy()
3206 if( pIndex->aiColumn[jj]!=XN_EXPR ) continue; in indexMightHelpWithOrderBy()
3406 pProbe = pTab->pIndex; in whereLoopAddBtree()
3424 pFirst = pSrc->pTab->pIndex; in whereLoopAddBtree()
3456 pNew->u.btree.pIndex = 0; in whereLoopAddBtree()
3512 pNew->u.btree.pIndex = pProbe; in whereLoopAddBtree()
4381 Index *pIndex; /* The index associated with pLoop */ in wherePathSatisfiesOrderBy() local
4482 pIndex = 0; in wherePathSatisfiesOrderBy()
4485 }else if( (pIndex = pLoop->u.btree.pIndex)==0 || pIndex->bUnordered ){ in wherePathSatisfiesOrderBy()
4488 nKeyCol = pIndex->nKeyCol; in wherePathSatisfiesOrderBy()
4489 nColumn = pIndex->nColumn; in wherePathSatisfiesOrderBy()
4490 assert( nColumn==nKeyCol+1 || !HasRowid(pIndex->pTable) ); in wherePathSatisfiesOrderBy()
4491 assert( pIndex->aiColumn[nColumn-1]==XN_ROWID in wherePathSatisfiesOrderBy()
4492 || !HasRowid(pIndex->pTable)); in wherePathSatisfiesOrderBy()
4497 isOrderDistinct = IsUniqueIndex(pIndex) in wherePathSatisfiesOrderBy()
4554 if( pIndex ){ in wherePathSatisfiesOrderBy()
4555 iColumn = pIndex->aiColumn[j]; in wherePathSatisfiesOrderBy()
4556 revIdx = pIndex->aSortOrder[j] & KEYINFO_ORDER_DESC; in wherePathSatisfiesOrderBy()
4557 if( iColumn==pIndex->pTable->iPKey ) iColumn = XN_ROWID; in wherePathSatisfiesOrderBy()
4569 && pIndex->pTable->aCol[iColumn].notNull==0 in wherePathSatisfiesOrderBy()
4594 Expr *pIdxExpr = pIndex->aColExpr->a[j].pExpr; in wherePathSatisfiesOrderBy()
4601 if( sqlite3StrICmp(pColl->zName, pIndex->azColl[j])!=0 ) continue; in wherePathSatisfiesOrderBy()
5217 for(pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext){ in whereShortCut()
5239 pLoop->u.btree.pIndex = pIdx; in whereShortCut()
6038 if( pLoop->u.btree.pIndex!=0 ){ in sqlite3WhereBegin()
6053 Index *pIx = pLoop->u.btree.pIndex; in sqlite3WhereBegin()
6066 Index *pJ = pTabItem->pTab->pIndex; in sqlite3WhereBegin()
6292 && (pIdx = pLoop->u.btree.pIndex)->hasStat1 in sqlite3WhereEnd()
6381 VdbeComment((v, "next skip-scan on %s", pLoop->u.btree.pIndex->zName)); in sqlite3WhereEnd()
6464 pIdx = pLoop->u.btree.pIndex; in sqlite3WhereEnd()