Lines Matching refs:aSample
16062 int nSample; /* Number of elements in aSample[] */
16064 tRowcnt *aAvgEq; /* Average nEq values for keys not in aSample */
16065 IndexSample *aSample; /* Samples of the left-most key */
99280 int i; /* Used to iterate through p->aSample[] */
100416 ** If the Index.aSample variable is not NULL, delete the aSample[] array
100421 if( pIdx->aSample ){
100424 IndexSample *p = &pIdx->aSample[j];
100427 sqlite3DbFree(db, pIdx->aSample);
100431 pIdx->aSample = 0;
100442 ** stored in pIdx->aSample[].
100446 IndexSample *aSample = pIdx->aSample;
100447 IndexSample *pFinal = &aSample[pIdx->nSample-1];
100483 || aSample[i].anDLt[iCol]!=aSample[i+1].anDLt[iCol]
100485 sumEq += aSample[i].anEq[iCol];
100518 ** into the relevant Index.aSample[] arrays.
100540 IndexSample *pSample; /* A slot in pIdx->aSample[] */
100582 pIdx->aSample = sqlite3DbMallocZero(db, nByte);
100583 if( pIdx->aSample==0 ){
100587 pSpace = (tRowcnt*)&pIdx->aSample[nSample];
100590 pIdx->aSample[i].anEq = pSpace; pSpace += nIdxCol;
100591 pIdx->aSample[i].anLt = pSpace; pSpace += nIdxCol;
100592 pIdx->aSample[i].anDLt = pSpace; pSpace += nIdxCol;
100594 assert( ((u8*)pSpace)-nByte==(u8*)(pIdx->aSample) );
100624 pSample = &pIdx->aSample[pIdx->nSample];
100653 ** the Index.aSample[] arrays of all indices.
100683 ** Index.aSample[] arrays.
100720 pIdx->aSample = 0;
133961 ** into the aSample[] array - it is an index into a virtual set of samples
133962 ** based on the contents of aSample[] and the number of fields in record
133972 IndexSample *aSample = pIdx->aSample;
133991 ** is simply the aSample[] array. If the samples in aSample[] contain more
133995 ** samples in aSample[] (truncated to N fields), the search also has to
133997 ** in aSample is:
133999 ** aSample[0] = (a, 5)
134000 ** aSample[1] = (a, 10)
134001 ** aSample[2] = (b, 5)
134002 ** aSample[3] = (c, 100)
134003 ** aSample[4] = (c, 105)
134020 ** For each sample in the aSample[] array, N samples are present in the
134022 ** sample aSample[0]. Samples 2 and 3 on aSample[1] etc.
134037 int iSamp; /* Index in aSample[] of test sample */
134043 /* The proposed effective sample is a prefix of sample aSample[iSamp].
134047 if( aSample[iSamp-1].anLt[n-1]!=aSample[iSamp].anLt[n-1] ) break;
134054 res = sqlite3VdbeRecordCompare(aSample[iSamp].n, aSample[iSamp].p, pRec);
134056 iLower = aSample[iSamp].anLt[n-1] + aSample[iSamp].anEq[n-1];
134059 iLower = aSample[iSamp].anLt[n-1];
134079 assert( 0==sqlite3VdbeRecordCompare(aSample[i].n, aSample[i].p, pRec)
134084 ** all samples in the aSample[] array, pRec must be smaller than the
134089 || sqlite3VdbeRecordCompare(aSample[i].n, aSample[i].p, pRec)>0
134093 ** in the aSample[] array. Otherwise, if (iCol>0) then pRec must
134098 assert( sqlite3VdbeRecordCompare(aSample[i].n, aSample[i].p, pRec)<=0
134103 assert( sqlite3VdbeRecordCompare(aSample[i-1].n, aSample[i-1].p, pRec)<0
134113 aStat[0] = aSample[i].anLt[iCol];
134114 aStat[1] = aSample[i].anEq[iCol];
134116 /* At this point, the (iCol+1) field prefix of aSample[i] is the first
134123 iUpper = aSample[i].anLt[iCol];
134254 rc = sqlite3Stat4Column(db, p->aSample[i].p, p->aSample[i].n, nEq, &pVal);
134375 int iLwrIdx = -2; /* aSample[] for the lower bound */
134376 int iUprIdx = -1; /* aSample[] for the upper bound */
134526 assert( p->aSample!=0 );
134589 assert( p->aSample!=0 );