Lines Matching defs:nEq
18117 tRowcnt *aAvgEq; /* Average nEq values for keys not in aSample */
114628 ** CREATE TABLE sqlite_stat3(tbl, idx, nEq, nLt, nDLt, sample);
114629 ** CREATE TABLE sqlite_stat4(tbl, idx, nEq, nLt, nDLt, sample);
114716 ** binary encoding of a key from the index. The nEq column is a
114719 ** the left-most column of the sample. The second integer in nEq
114736 ** large nEq values.
114744 ** sqlite_stat4.sample. The nEq, nLt, and nDLt entries of sqlite_stat3
114873 tRowcnt *anEq; /* sqlite_stat4.nEq */
116247 tRowcnt sumEq = 0; /* Sum of the nEq values */
116265 ** the nEq values for column iCol for the same set (adding the value
151447 u16 nEq; /* Number of equality constraints */
151936 #define WHERE_BIGNULL_SORT 0x00080000 /* Column nEq of index is BIGNULL */
152015 u16 nEq = pLoop->u.btree.nEq;
152019 if( nEq==0 && (pLoop->wsFlags&(WHERE_BTM_LIMIT|WHERE_TOP_LIMIT))==0 ) return;
152021 for(i=0; i<nEq; i++){
152073 || ((flags&WHERE_VIRTUALTABLE)==0 && (pLoop->u.btree.nEq>0))
152189 for(i=pLoop->nSkip; i<pLoop->u.btree.nEq; i++){
152511 int nEq = 0;
152533 if( pLoop->aLTerm[i]->pExpr==pX ) nEq++;
152545 aiMap = (int*)sqlite3DbMallocZero(pParse->db, sizeof(int)*nEq);
152552 aiMap = (int*)sqlite3DbMallocZero(pParse->db, sizeof(int)*MAX(nEq,n));
152576 pLevel->u.in.nIn += nEq;
152655 ** In the example above nEq==2. But this subroutine works for any value
152656 ** of nEq including 0. If nEq==0, this routine is nearly a no-op.
152661 ** are == or IN and are covered by the nEq. nExtraReg is 1 if there is
152663 ** occurs after the nEq quality constraints.
152665 ** This routine allocates a range of nEq+nExtraReg memory cells and returns
152670 ** this routine allocates an additional nEq memory cells for internal
152695 u16 nEq; /* The number of == or IN constraints to code */
152709 nEq = pLoop->u.btree.nEq;
152717 nReg = pLoop->u.btree.nEq + nExtraReg;
152746 assert( zAff==0 || (int)strlen(zAff)>=nEq );
152747 for(j=nSkip; j<nEq; j++){
152765 for(j=nSkip; j<nEq; j++){
153016 if( pLoop->u.btree.nEq==0 && pTerm!=pEndRange ){
153220 u16 nEq = pLoop->u.btree.nEq;
153227 codeApplyAffinity(pParse, r1, nEq, zStartAff);
153230 addrNxt, r1, nEq);
153467 assert( pLoop->u.btree.nEq==1 );
153643 u16 nEq = pLoop->u.btree.nEq; /* Number of == or IN terms */
153666 assert( nEq>=pLoop->nSkip );
153671 j = nEq;
153693 testcase( pIdx->aSortOrder[nEq]==SQLITE_SO_DESC );
153696 pLevel->iLikeRepCntr |= bRev ^ (pIdx->aSortOrder[nEq]==SQLITE_SO_DESC);
153700 j = pIdx->aiColumn[nEq];
153708 /* If the WHERE_BIGNULL_SORT flag is set, then index column nEq uses
153734 if( (nEq<pIdx->nColumn && bRev==(pIdx->aSortOrder[nEq]==SQLITE_SO_ASC)) ){
153752 assert( zStartAff==0 || sqlite3Strlen30(zStartAff)>=nEq );
153754 zEndAff = sqlite3DbStrDup(db, &zStartAff[nEq]);
153764 start_constraints = pRangeStart || nEq>0;
153767 nConstraint = nEq;
153770 codeExprOrVector(pParse, pRight, regBase+nEq, nBtm);
153775 sqlite3VdbeAddOp2(v, OP_IsNull, regBase+nEq, addrNxt);
153779 updateRangeAffinityStr(pRight, nBtm, &zStartAff[nEq]);
153791 sqlite3VdbeAddOp2(v, OP_Null, 0, regBase+nEq);
153795 sqlite3VdbeAddOp2(v, OP_Null, 0, regBase+nEq);
153811 regBase, nEq);
153867 nConstraint = nEq;
153881 codeExprOrVector(pParse, pRight, regBase+nEq, nTop);
153886 sqlite3VdbeAddOp2(v, OP_IsNull, regBase+nEq, addrNxt);
153891 codeApplyAffinity(pParse, regBase+nEq, nTop, zEndAff);
153905 sqlite3VdbeAddOp2(v, OP_Null, 0, regBase+nEq);
153951 sqlite3VdbeAddOp3(v, OP_SeekHit, iIdxCur, nEq, nEq);
157449 pLoop->u.btree.nEq = pLoop->nLTerm = nKeyCol;
157500 assert( (u32)n==pLoop->u.btree.nEq );
157556 regBase, pLoop->u.btree.nEq);
157671 int n = pLoop->u.btree.nEq;
158247 int nEq = pLoop->u.btree.nEq;
158252 u8 aff = sqlite3IndexColumnAffinity(db, p, nEq);
158259 pColl = sqlite3LocateCollSeq(pParse, p->azColl[nEq]);
158273 rc = sqlite3Stat4Column(db, p->aSample[i].p, p->aSample[i].n, nEq, &pVal);
158326 ** The value in (pBuilder->pNew->u.btree.nEq) is the number of the index
158333 ** then nEq is set to 1 (as the range restricted column, b, is the second
158338 ** then nEq is set to 0.
158342 ** considering the range constraints. If nEq is 0, then *pnOut is the number of
158364 int nEq = pLoop->u.btree.nEq;
158366 if( p->nSample>0 && ALWAYS(nEq<p->nSampleCol)
158369 if( nEq==pBuilder->nRecValid ){
158378 ** key-prefix formed by the nEq values matched against the nEq left-most
158404 if( nEq==0 ){
158418 if( p->aSortOrder[nEq] ){
158428 rc = sqlite3Stat4ProbeSetValue(pParse, p, &pRec, pExpr, nBtm, nEq, &n);
158445 rc = sqlite3Stat4ProbeSetValue(pParse, p, &pRec, pExpr, nTop, nEq, &n);
158539 int nEq = pBuilder->pNew->u.btree.nEq;
158545 assert( nEq>=1 );
158546 assert( nEq<=p->nColumn );
158549 assert( pBuilder->nRecValid<nEq );
158553 if( pBuilder->nRecValid<(nEq-1) ){
158559 if( nEq>=p->nColumn ){
158564 rc = sqlite3Stat4ProbeSetValue(pParse, p, &pRec, pExpr, 1, nEq-1, &bOk);
158568 pBuilder->nRecValid = nEq;
158572 p->zName, nEq-1, (int)a[1]));
158709 sqlite3DebugPrintf(".%-16s %2d", zName, p->u.btree.nEq);
159245 ** in the vector can be optimized using column nEq of the index. This
159257 ** then this function would be invoked with nEq=1. The value returned in
159264 int nEq, /* Number of prior equality constraints on same index */
159270 nCmp = MIN(nCmp, (pIdx->nColumn - nEq));
159272 /* Test if comparison i of pTerm is compatible with column (i+nEq)
159294 || pLhs->iColumn!=pIdx->aiColumn[i+nEq]
159295 || pIdx->aSortOrder[i+nEq]!=pIdx->aSortOrder[nEq]
159307 if( sqlite3StrICmp(pColl->zName, pIdx->azColl[i+nEq]) ) break;
159323 ** We have so far matched pBuilder->pNew->u.btree.nEq terms of the
159327 ** number of rows expected to be visited by filtering using the nEq
159349 u16 saved_nEq; /* Original value of pNew->u.btree.nEq */
159362 WHERETRACE(0x800, ("BEGIN %s.addBtreeIdx(%s), nEq=%d, nSkip=%d, rRun=%d\n",
159364 pNew->u.btree.nEq, pNew->nSkip, pNew->rRun));
159376 assert( pNew->u.btree.nEq<pProbe->nColumn );
159377 assert( pNew->u.btree.nEq<pProbe->nKeyCol
159380 saved_nEq = pNew->u.btree.nEq;
159423 pNew->u.btree.nEq = saved_nEq;
159509 assert( saved_nEq==pNew->u.btree.nEq );
159570 int nEq = ++pNew->u.btree.nEq;
159584 && ALWAYS(pNew->u.btree.nEq<=pProbe->nSampleCol)
159601 if( nEq==1
159629 pNew->nOut += (pProbe->aiRowLogEst[nEq] - pProbe->aiRowLogEst[nEq-1]);
159665 && pNew->u.btree.nEq<pProbe->nColumn
159666 && (pNew->u.btree.nEq<pProbe->nKeyCol ||
159677 pNew->u.btree.nEq = saved_nEq;
159706 pNew->u.btree.nEq++;
159717 pNew->u.btree.nEq = saved_nEq;
159722 WHERETRACE(0x800, ("END %s.addBtreeIdx(%s), nEq=%d, rc=%d\n",
160004 pNew->u.btree.nEq = 1;
160053 pNew->u.btree.nEq = 0;
161059 assert( j>=pLoop->u.btree.nEq
161062 if( j<pLoop->u.btree.nEq && j>=pLoop->nSkip ){
161087 ** j<pLoop->u.btree.nEq constraint above. Any equality other
161091 for(i=j+1; i<pLoop->u.btree.nEq; i++){
161118 && j>=pLoop->u.btree.nEq
161175 if( j==pLoop->u.btree.nEq ){
161763 pLoop->u.btree.nEq = 1;
161788 pLoop->u.btree.nEq = j;