Lines Matching refs:pIdxInfo
214 static int statBestIndex(sqlite3_vtab *tab, sqlite3_index_info *pIdxInfo){ in statBestIndex() argument
225 for(i=0; i<pIdxInfo->nConstraint; i++){ in statBestIndex()
226 if( pIdxInfo->aConstraint[i].op!=SQLITE_INDEX_CONSTRAINT_EQ ) continue; in statBestIndex()
227 if( pIdxInfo->aConstraint[i].usable==0 ){ in statBestIndex()
231 switch( pIdxInfo->aConstraint[i].iColumn ){ in statBestIndex()
248 pIdxInfo->aConstraintUsage[iSchema].argvIndex = ++i; in statBestIndex()
249 pIdxInfo->aConstraintUsage[iSchema].omit = 1; in statBestIndex()
250 pIdxInfo->idxNum |= 0x01; in statBestIndex()
253 pIdxInfo->aConstraintUsage[iName].argvIndex = ++i; in statBestIndex()
254 pIdxInfo->idxNum |= 0x02; in statBestIndex()
257 pIdxInfo->aConstraintUsage[iAgg].argvIndex = ++i; in statBestIndex()
258 pIdxInfo->idxNum |= 0x04; in statBestIndex()
260 pIdxInfo->estimatedCost = 1.0; in statBestIndex()
266 if( ( pIdxInfo->nOrderBy==1 in statBestIndex()
267 && pIdxInfo->aOrderBy[0].iColumn==0 in statBestIndex()
268 && pIdxInfo->aOrderBy[0].desc==0 in statBestIndex()
270 ( pIdxInfo->nOrderBy==2 in statBestIndex()
271 && pIdxInfo->aOrderBy[0].iColumn==0 in statBestIndex()
272 && pIdxInfo->aOrderBy[0].desc==0 in statBestIndex()
273 && pIdxInfo->aOrderBy[1].iColumn==1 in statBestIndex()
274 && pIdxInfo->aOrderBy[1].desc==0 in statBestIndex()
277 pIdxInfo->orderByConsumed = 1; in statBestIndex()
278 pIdxInfo->idxNum |= 0x08; in statBestIndex()