Lines Matching refs:aSample

17979   int nSample;             /* Number of elements in aSample[] */
17981 tRowcnt *aAvgEq; /* Average nEq values for keys not in aSample */
17982 IndexSample *aSample; /* Samples of the left-most key */
109224 int i; /* Used to iterate through p->aSample[] */
110375 ** If the Index.aSample variable is not NULL, delete the aSample[] array
110380 if( pIdx->aSample ){
110383 IndexSample *p = &pIdx->aSample[j];
110386 sqlite3DbFree(db, pIdx->aSample);
110390 pIdx->aSample = 0;
110401 ** stored in pIdx->aSample[].
110405 IndexSample *aSample = pIdx->aSample;
110406 IndexSample *pFinal = &aSample[pIdx->nSample-1];
110442 || aSample[i].anDLt[iCol]!=aSample[i+1].anDLt[iCol]
110444 sumEq += aSample[i].anEq[iCol];
110477 ** into the relevant Index.aSample[] arrays.
110497 IndexSample *pSample; /* A slot in pIdx->aSample[] */
110535 pIdx->aSample = sqlite3DbMallocZero(db, nByte);
110536 if( pIdx->aSample==0 ){
110540 pSpace = (tRowcnt*)&pIdx->aSample[nSample];
110544 pIdx->aSample[i].anEq = pSpace; pSpace += nIdxCol;
110545 pIdx->aSample[i].anLt = pSpace; pSpace += nIdxCol;
110546 pIdx->aSample[i].anDLt = pSpace; pSpace += nIdxCol;
110548 assert( ((u8*)pSpace)-nByte==(u8*)(pIdx->aSample) );
110577 pSample = &pIdx->aSample[pIdx->nSample];
110606 ** the Index.aSample[] arrays of all indices.
110627 ** Index.aSample[] arrays.
110664 pIdx->aSample = 0;
149431 ** into the aSample[] array - it is an index into a virtual set of samples
149432 ** based on the contents of aSample[] and the number of fields in record
149442 IndexSample *aSample = pIdx->aSample;
149461 ** is simply the aSample[] array. If the samples in aSample[] contain more
149465 ** samples in aSample[] (truncated to N fields), the search also has to
149467 ** in aSample is:
149469 ** aSample[0] = (a, 5)
149470 ** aSample[1] = (a, 10)
149471 ** aSample[2] = (b, 5)
149472 ** aSample[3] = (c, 100)
149473 ** aSample[4] = (c, 105)
149490 ** For each sample in the aSample[] array, N samples are present in the
149492 ** sample aSample[0]. Samples 2 and 3 on aSample[1] etc.
149507 int iSamp; /* Index in aSample[] of test sample */
149513 /* The proposed effective sample is a prefix of sample aSample[iSamp].
149517 if( aSample[iSamp-1].anLt[n-1]!=aSample[iSamp].anLt[n-1] ) break;
149524 res = sqlite3VdbeRecordCompare(aSample[iSamp].n, aSample[iSamp].p, pRec);
149526 iLower = aSample[iSamp].anLt[n-1] + aSample[iSamp].anEq[n-1];
149529 iLower = aSample[iSamp].anLt[n-1];
149549 assert( 0==sqlite3VdbeRecordCompare(aSample[i].n, aSample[i].p, pRec)
149554 ** all samples in the aSample[] array, pRec must be smaller than the
149559 || sqlite3VdbeRecordCompare(aSample[i].n, aSample[i].p, pRec)>0
149563 ** in the aSample[] array. Otherwise, if (iCol>0) then pRec must
149568 assert( sqlite3VdbeRecordCompare(aSample[i].n, aSample[i].p, pRec)<=0
149573 assert( sqlite3VdbeRecordCompare(aSample[i-1].n, aSample[i-1].p, pRec)<0
149583 aStat[0] = aSample[i].anLt[iCol];
149584 aStat[1] = aSample[i].anEq[iCol];
149586 /* At this point, the (iCol+1) field prefix of aSample[i] is the first
149593 iUpper = aSample[i].anLt[iCol];
149725 rc = sqlite3Stat4Column(db, p->aSample[i].p, p->aSample[i].n, nEq, &pVal);
149848 int iLwrIdx = -2; /* aSample[] for the lower bound */
149849 int iUprIdx = -1; /* aSample[] for the upper bound */
149999 assert( p->aSample!=0 );
150062 assert( p->aSample!=0 );