Lines Matching defs:aSample
18115 int nSample; /* Number of elements in aSample[] */
18117 tRowcnt *aAvgEq; /* Average nEq values for keys not in aSample */
18118 IndexSample *aSample; /* Samples of the left-most key */
115062 int i; /* Used to iterate through p->aSample[] */
116202 ** If the Index.aSample variable is not NULL, delete the aSample[] array
116207 if( pIdx->aSample ){
116210 IndexSample *p = &pIdx->aSample[j];
116213 sqlite3DbFree(db, pIdx->aSample);
116217 pIdx->aSample = 0;
116228 ** stored in pIdx->aSample[].
116232 IndexSample *aSample = pIdx->aSample;
116233 IndexSample *pFinal = &aSample[pIdx->nSample-1];
116269 || aSample[i].anDLt[iCol]!=aSample[i+1].anDLt[iCol]
116271 sumEq += aSample[i].anEq[iCol];
116304 ** into the relevant Index.aSample[] arrays.
116324 IndexSample *pSample; /* A slot in pIdx->aSample[] */
116362 pIdx->aSample = sqlite3DbMallocZero(db, nByte);
116363 if( pIdx->aSample==0 ){
116367 pSpace = (tRowcnt*)&pIdx->aSample[nSample];
116371 pIdx->aSample[i].anEq = pSpace; pSpace += nIdxCol;
116372 pIdx->aSample[i].anLt = pSpace; pSpace += nIdxCol;
116373 pIdx->aSample[i].anDLt = pSpace; pSpace += nIdxCol;
116375 assert( ((u8*)pSpace)-nByte==(u8*)(pIdx->aSample) );
116404 pSample = &pIdx->aSample[pIdx->nSample];
116433 ** the Index.aSample[] arrays of all indices.
116457 ** Index.aSample[] arrays.
116495 pIdx->aSample = 0;
157979 ** into the aSample[] array - it is an index into a virtual set of samples
157980 ** based on the contents of aSample[] and the number of fields in record
157990 IndexSample *aSample = pIdx->aSample;
158009 ** is simply the aSample[] array. If the samples in aSample[] contain more
158013 ** samples in aSample[] (truncated to N fields), the search also has to
158015 ** in aSample is:
158017 ** aSample[0] = (a, 5)
158018 ** aSample[1] = (a, 10)
158019 ** aSample[2] = (b, 5)
158020 ** aSample[3] = (c, 100)
158021 ** aSample[4] = (c, 105)
158038 ** For each sample in the aSample[] array, N samples are present in the
158040 ** sample aSample[0]. Samples 2 and 3 on aSample[1] etc.
158055 int iSamp; /* Index in aSample[] of test sample */
158061 /* The proposed effective sample is a prefix of sample aSample[iSamp].
158065 if( aSample[iSamp-1].anLt[n-1]!=aSample[iSamp].anLt[n-1] ) break;
158072 res = sqlite3VdbeRecordCompare(aSample[iSamp].n, aSample[iSamp].p, pRec);
158074 iLower = aSample[iSamp].anLt[n-1] + aSample[iSamp].anEq[n-1];
158077 iLower = aSample[iSamp].anLt[n-1];
158097 assert( 0==sqlite3VdbeRecordCompare(aSample[i].n, aSample[i].p, pRec)
158102 ** all samples in the aSample[] array, pRec must be smaller than the
158107 || sqlite3VdbeRecordCompare(aSample[i].n, aSample[i].p, pRec)>0
158111 ** in the aSample[] array. Otherwise, if (iCol>0) then pRec must
158116 assert( sqlite3VdbeRecordCompare(aSample[i].n, aSample[i].p, pRec)<=0
158121 assert( sqlite3VdbeRecordCompare(aSample[i-1].n, aSample[i-1].p, pRec)<0
158131 aStat[0] = aSample[i].anLt[iCol];
158132 aStat[1] = aSample[i].anEq[iCol];
158134 /* At this point, the (iCol+1) field prefix of aSample[i] is the first
158141 iUpper = aSample[i].anLt[iCol];
158273 rc = sqlite3Stat4Column(db, p->aSample[i].p, p->aSample[i].n, nEq, &pVal);
158396 int iLwrIdx = -2; /* aSample[] for the lower bound */
158397 int iUprIdx = -1; /* aSample[] for the upper bound */
158547 assert( p->aSample!=0 );
158610 assert( p->aSample!=0 );