Lines Matching refs:nKeyCol

632     for(i=0; i<pIdx->nKeyCol; i++){  in isDistinctRedundant()
638 if( i==pIdx->nKeyCol ){ in isDistinctRedundant()
827 int nKeyCol; /* Number of columns in the constructed index */ in constructAutomaticIndex() local
859 nKeyCol = 0; in constructAutomaticIndex()
890 if( whereLoopResize(pParse->db, pLoop, nKeyCol+1) ){ in constructAutomaticIndex()
893 pLoop->aLTerm[nKeyCol++] = pTerm; in constructAutomaticIndex()
898 assert( nKeyCol>0 || pParse->db->mallocFailed ); in constructAutomaticIndex()
899 pLoop->u.btree.nEq = pLoop->nLTerm = nKeyCol; in constructAutomaticIndex()
916 if( extraCols & MASKBIT(i) ) nKeyCol++; in constructAutomaticIndex()
919 nKeyCol += pTable->nCol - BMS + 1; in constructAutomaticIndex()
923 pIdx = sqlite3AllocateIndexObject(pParse->db, nKeyCol+1, 0, &zNotUsed); in constructAutomaticIndex()
968 assert( n==nKeyCol ); in constructAutomaticIndex()
975 sqlite3VdbeAddOp2(v, OP_OpenAutoindex, pLevel->iIdxCur, nKeyCol+1); in constructAutomaticIndex()
2827 assert( pNew->u.btree.nEq<pProbe->nKeyCol in whereLoopAddBtreeIndex()
2867 if( IsUniqueIndex(pProbe) && saved_nEq==pProbe->nKeyCol-1 ){ in whereLoopAddBtreeIndex()
2961 || (iCol>=0 && nInMul==0 && saved_nEq==pProbe->nKeyCol-1) in whereLoopAddBtreeIndex()
2964 || (pProbe->nKeyCol==1 && pProbe->onError && eOp==WO_EQ) in whereLoopAddBtreeIndex()
3116 && (pNew->u.btree.nEq<pProbe->nKeyCol || in whereLoopAddBtreeIndex()
3147 && saved_nEq+1<pProbe->nKeyCol in whereLoopAddBtreeIndex()
3201 for(jj=0; jj<pIndex->nKeyCol; jj++){ in indexMightHelpWithOrderBy()
3205 for(jj=0; jj<pIndex->nKeyCol; jj++){ in indexMightHelpWithOrderBy()
3414 sPk.nKeyCol = 1; in whereLoopAddBtree()
4370 u16 nKeyCol; /* Number of key columns in pIndex */ in wherePathSatisfiesOrderBy() local
4483 nKeyCol = 0; in wherePathSatisfiesOrderBy()
4488 nKeyCol = pIndex->nKeyCol; in wherePathSatisfiesOrderBy()
4490 assert( nColumn==nKeyCol+1 || !HasRowid(pIndex->pTable) ); in wherePathSatisfiesOrderBy()
4639 if( j==0 || j<nKeyCol ){ in wherePathSatisfiesOrderBy()
5222 || pIdx->nKeyCol>ArraySize(pLoop->aLTermSpace) in whereShortCut()
5225 for(j=0; j<pIdx->nKeyCol; j++){ in whereShortCut()
5232 if( j!=pIdx->nKeyCol ) continue; in whereShortCut()
6140 sqlite3VdbeAddOp2(v, OP_OpenEphemeral, pRJ->iMatch, pPk->nKeyCol); in sqlite3WhereBegin()