Lines Matching defs:pIdx
11622 static int dbdataBestIndex(sqlite3_vtab *tab, sqlite3_index_info *pIdx){
11629 for(i=0; i<pIdx->nConstraint; i++){
11630 struct sqlite3_index_constraint *p = &pIdx->aConstraint[i];
11643 pIdx->aConstraintUsage[iSchema].argvIndex = 1;
11644 pIdx->aConstraintUsage[iSchema].omit = 1;
11647 pIdx->aConstraintUsage[iPgno].argvIndex = 1 + (iSchema>=0);
11648 pIdx->aConstraintUsage[iPgno].omit = 1;
11649 pIdx->estimatedCost = 100;
11650 pIdx->estimatedRows = 50;
11652 if( pTab->bPtr==0 && pIdx->nOrderBy && pIdx->aOrderBy[0].desc==0 ){
11653 int iCol = pIdx->aOrderBy[0].iColumn;
11654 if( pIdx->nOrderBy==1 ){
11655 pIdx->orderByConsumed = (iCol==0 || iCol==1);
11656 }else if( pIdx->nOrderBy==2 && pIdx->aOrderBy[1].desc==0 && iCol==0 ){
11657 pIdx->orderByConsumed = (pIdx->aOrderBy[1].iColumn==1);
11662 pIdx->estimatedCost = 100000000;
11663 pIdx->estimatedRows = 1000000000;
11665 pIdx->idxNum = (iSchema>=0 ? 0x01 : 0x00) | (iPgno>=0 ? 0x02 : 0x00);