Lines Matching defs:nEq

17981   tRowcnt *aAvgEq;         /* Average nEq values for keys not in aSample */
108789 ** CREATE TABLE sqlite_stat3(tbl, idx, nEq, nLt, nDLt, sample);
108790 ** CREATE TABLE sqlite_stat4(tbl, idx, nEq, nLt, nDLt, sample);
108877 ** binary encoding of a key from the index. The nEq column is a
108880 ** the left-most column of the sample. The second integer in nEq
108897 ** large nEq values.
108905 ** sqlite_stat4.sample. The nEq, nLt, and nDLt entries of sqlite_stat3
109034 tRowcnt *anEq; /* sqlite_stat4.nEq */
110420 tRowcnt sumEq = 0; /* Sum of the nEq values */
110438 ** the nEq values for column iCol for the same set (adding the value
143435 u16 nEq; /* Number of equality constraints */
143922 #define WHERE_BIGNULL_SORT 0x00080000 /* Column nEq of index is BIGNULL */
143996 u16 nEq = pLoop->u.btree.nEq;
144000 if( nEq==0 && (pLoop->wsFlags&(WHERE_BTM_LIMIT|WHERE_TOP_LIMIT))==0 ) return;
144002 for(i=0; i<nEq; i++){
144054 || ((flags&WHERE_VIRTUALTABLE)==0 && (pLoop->u.btree.nEq>0))
144426 int nEq = 0;
144448 if( pLoop->aLTerm[i]->pExpr==pX ) nEq++;
144459 aiMap = (int*)sqlite3DbMallocZero(pParse->db, sizeof(int)*nEq);
144485 pLevel->u.in.nIn += nEq;
144548 ** In the example above nEq==2. But this subroutine works for any value
144549 ** of nEq including 0. If nEq==0, this routine is nearly a no-op.
144554 ** are == or IN and are covered by the nEq. nExtraReg is 1 if there is
144556 ** occurs after the nEq quality constraints.
144558 ** This routine allocates a range of nEq+nExtraReg memory cells and returns
144563 ** this routine allocates an additional nEq memory cells for internal
144588 u16 nEq; /* The number of == or IN constraints to code */
144602 nEq = pLoop->u.btree.nEq;
144610 nReg = pLoop->u.btree.nEq + nExtraReg;
144637 assert( zAff==0 || (int)strlen(zAff)>=nEq );
144638 for(j=nSkip; j<nEq; j++){
144903 if( pLoop->u.btree.nEq==0 && pTerm!=pEndRange ){
145383 assert( pLoop->u.btree.nEq==1 );
145554 u16 nEq = pLoop->u.btree.nEq; /* Number of == or IN terms */
145577 assert( nEq>=pLoop->nSkip );
145582 j = nEq;
145604 testcase( pIdx->aSortOrder[nEq]==SQLITE_SO_DESC );
145607 pLevel->iLikeRepCntr |= bRev ^ (pIdx->aSortOrder[nEq]==SQLITE_SO_DESC);
145611 j = pIdx->aiColumn[nEq];
145619 /* If the WHERE_BIGNULL_SORT flag is set, then index column nEq uses
145645 if( (nEq<pIdx->nKeyCol && bRev==(pIdx->aSortOrder[nEq]==SQLITE_SO_ASC))
145646 || (bRev && pIdx->nKeyCol==nEq)
145665 assert( zStartAff==0 || sqlite3Strlen30(zStartAff)>=nEq );
145667 zEndAff = sqlite3DbStrDup(db, &zStartAff[nEq]);
145677 start_constraints = pRangeStart || nEq>0;
145680 nConstraint = nEq;
145683 codeExprOrVector(pParse, pRight, regBase+nEq, nBtm);
145688 sqlite3VdbeAddOp2(v, OP_IsNull, regBase+nEq, addrNxt);
145692 updateRangeAffinityStr(pRight, nBtm, &zStartAff[nEq]);
145704 sqlite3VdbeAddOp2(v, OP_Null, 0, regBase+nEq);
145708 sqlite3VdbeAddOp2(v, OP_Null, 0, regBase+nEq);
145769 nConstraint = nEq;
145772 codeExprOrVector(pParse, pRight, regBase+nEq, nTop);
145777 sqlite3VdbeAddOp2(v, OP_IsNull, regBase+nEq, addrNxt);
145782 codeApplyAffinity(pParse, regBase+nEq, nTop, zEndAff);
145796 sqlite3VdbeAddOp2(v, OP_Null, 0, regBase+nEq);
145842 sqlite3VdbeAddOp3(v, OP_SeekHit, iIdxCur, nEq, nEq);
149113 pLoop->u.btree.nEq = pLoop->nLTerm = nKeyCol;
149161 assert( (u32)n==pLoop->u.btree.nEq );
149699 int nEq = pLoop->u.btree.nEq;
149704 u8 aff = sqlite3IndexColumnAffinity(db, p, nEq);
149711 pColl = sqlite3LocateCollSeq(pParse, p->azColl[nEq]);
149725 rc = sqlite3Stat4Column(db, p->aSample[i].p, p->aSample[i].n, nEq, &pVal);
149778 ** The value in (pBuilder->pNew->u.btree.nEq) is the number of the index
149785 ** then nEq is set to 1 (as the range restricted column, b, is the second
149790 ** then nEq is set to 0.
149794 ** considering the range constraints. If nEq is 0, then *pnOut is the number of
149816 int nEq = pLoop->u.btree.nEq;
149818 if( p->nSample>0 && ALWAYS(nEq<p->nSampleCol)
149821 if( nEq==pBuilder->nRecValid ){
149830 ** key-prefix formed by the nEq values matched against the nEq left-most
149856 if( nEq==0 ){
149870 if( p->aSortOrder[nEq] ){
149880 rc = sqlite3Stat4ProbeSetValue(pParse, p, &pRec, pExpr, nBtm, nEq, &n);
149897 rc = sqlite3Stat4ProbeSetValue(pParse, p, &pRec, pExpr, nTop, nEq, &n);
149991 int nEq = pBuilder->pNew->u.btree.nEq;
149997 assert( nEq>=1 );
149998 assert( nEq<=p->nColumn );
150001 assert( pBuilder->nRecValid<nEq );
150005 if( pBuilder->nRecValid<(nEq-1) ){
150011 if( nEq>=p->nColumn ){
150016 rc = sqlite3Stat4ProbeSetValue(pParse, p, &pRec, pExpr, 1, nEq-1, &bOk);
150020 pBuilder->nRecValid = nEq;
150024 p->zName, nEq-1, (int)a[1]));
150160 sqlite3DebugPrintf(".%-16s %2d", zName, p->u.btree.nEq);
150668 ** in the vector can be optimized using column nEq of the index. This
150680 ** then this function would be invoked with nEq=1. The value returned in
150687 int nEq, /* Number of prior equality constraints on same index */
150693 nCmp = MIN(nCmp, (pIdx->nColumn - nEq));
150695 /* Test if comparison i of pTerm is compatible with column (i+nEq)
150714 || pLhs->iColumn!=pIdx->aiColumn[i+nEq]
150715 || pIdx->aSortOrder[i+nEq]!=pIdx->aSortOrder[nEq]
150727 if( sqlite3StrICmp(pColl->zName, pIdx->azColl[i+nEq]) ) break;
150743 ** We have so far matched pBuilder->pNew->u.btree.nEq terms of the
150747 ** number of rows expected to be visited by filtering using the nEq
150769 u16 saved_nEq; /* Original value of pNew->u.btree.nEq */
150782 WHERETRACE(0x800, ("BEGIN %s.addBtreeIdx(%s), nEq=%d, nSkip=%d, rRun=%d\n",
150784 pNew->u.btree.nEq, pNew->nSkip, pNew->rRun));
150796 assert( pNew->u.btree.nEq<pProbe->nColumn );
150798 saved_nEq = pNew->u.btree.nEq;
150845 pNew->u.btree.nEq = saved_nEq;
150918 assert( saved_nEq==pNew->u.btree.nEq );
150977 int nEq = ++pNew->u.btree.nEq;
150991 && pNew->u.btree.nEq<=pProbe->nSampleCol
151008 if( nEq==1
151036 pNew->nOut += (pProbe->aiRowLogEst[nEq] - pProbe->aiRowLogEst[nEq-1]);
151072 && pNew->u.btree.nEq<pProbe->nColumn
151082 pNew->u.btree.nEq = saved_nEq;
151111 pNew->u.btree.nEq++;
151122 pNew->u.btree.nEq = saved_nEq;
151127 WHERETRACE(0x800, ("END %s.addBtreeIdx(%s), nEq=%d, rc=%d\n",
151315 pNew->u.btree.nEq = 1;
151365 pNew->u.btree.nEq = 0;
152185 assert( j>=pLoop->u.btree.nEq
152188 if( j<pLoop->u.btree.nEq && j>=pLoop->nSkip ){
152213 ** j<pLoop->u.btree.nEq constraint above. Any equality other
152217 for(i=j+1; i<pLoop->u.btree.nEq; i++){
152244 && j>=pLoop->u.btree.nEq
152295 if( j==pLoop->u.btree.nEq ){
152870 pLoop->u.btree.nEq = 1;
152894 pLoop->u.btree.nEq = j;