Lines Matching defs:pIdxInfo

97870   sqlite3_index_info *pIdxInfo
97877 pIdxInfo->estimatedCost = (double)100;
97878 pIdxInfo->estimatedRows = 100;
97879 pIdxInfo->idxNum = 0;
97880 for(i=0, p=pIdxInfo->aConstraint; i<pIdxInfo->nConstraint; i++, p++){
97884 pIdxInfo->aConstraintUsage[i].omit = 1;
97885 pIdxInfo->aConstraintUsage[i].argvIndex = 1;
97888 pIdxInfo->aConstraintUsage[i].omit = 1;
97889 pIdxInfo->idxNum = 1;
129927 static int pragmaVtabBestIndex(sqlite3_vtab *tab, sqlite3_index_info *pIdxInfo){
129933 pIdxInfo->estimatedCost = (double)1;
129935 pConstraint = pIdxInfo->aConstraint;
129938 for(i=0; i<pIdxInfo->nConstraint; i++, pConstraint++){
129947 pIdxInfo->estimatedCost = (double)2147483647;
129948 pIdxInfo->estimatedRows = 2147483647;
129952 pIdxInfo->aConstraintUsage[j].argvIndex = 1;
129953 pIdxInfo->aConstraintUsage[j].omit = 1;
129955 pIdxInfo->estimatedCost = (double)20;
129956 pIdxInfo->estimatedRows = 20;
129958 pIdxInfo->aConstraintUsage[j].argvIndex = 2;
129959 pIdxInfo->aConstraintUsage[j].omit = 1;
149259 sqlite3_index_info *pIdxInfo;
149297 pIdxInfo = sqlite3DbMallocZero(pParse->db, sizeof(*pIdxInfo)
149300 if( pIdxInfo==0 ){
149304 pHidden = (struct HiddenIndexInfo*)&pIdxInfo[1];
149308 pIdxInfo->nOrderBy = nOrderBy;
149309 pIdxInfo->aConstraint = pIdxCons;
149310 pIdxInfo->aOrderBy = pIdxOrderBy;
149311 pIdxInfo->aConstraintUsage = pUsage;
149371 pIdxInfo->nConstraint = j;
149379 return pIdxInfo;
151492 ** Argument pIdxInfo is already populated with all constraints that may
151516 sqlite3_index_info *pIdxInfo, /* Populated object for xBestIndex */
151522 struct sqlite3_index_constraint_usage *pUsage = pIdxInfo->aConstraintUsage;
151529 int nConstraint = pIdxInfo->nConstraint;
151537 pIdxCons = *(struct sqlite3_index_constraint**)&pIdxInfo->aConstraint;
151550 assert( pIdxInfo->needToFreeIdxStr==0 );
151551 pIdxInfo->idxStr = 0;
151552 pIdxInfo->idxNum = 0;
151553 pIdxInfo->orderByConsumed = 0;
151554 pIdxInfo->estimatedCost = SQLITE_BIG_DBL / (double)2;
151555 pIdxInfo->estimatedRows = 25;
151556 pIdxInfo->idxFlags = 0;
151557 pIdxInfo->colUsed = (sqlite3_int64)pSrc->colUsed;
151560 rc = vtabBestIndex(pParse, pSrc->pTab, pIdxInfo);
151577 pIdxCons = *(struct sqlite3_index_constraint**)&pIdxInfo->aConstraint;
151590 testcase( pIdxInfo->needToFreeIdxStr );
151617 pIdxInfo->orderByConsumed = 0;
151618 pIdxInfo->idxFlags &= ~SQLITE_INDEX_SCAN_UNIQUE;
151630 testcase( pIdxInfo->needToFreeIdxStr );
151635 pNew->u.vtab.idxNum = pIdxInfo->idxNum;
151636 pNew->u.vtab.needFree = pIdxInfo->needToFreeIdxStr;
151637 pIdxInfo->needToFreeIdxStr = 0;
151638 pNew->u.vtab.idxStr = pIdxInfo->idxStr;
151639 pNew->u.vtab.isOrdered = (i8)(pIdxInfo->orderByConsumed ?
151640 pIdxInfo->nOrderBy : 0);
151642 pNew->rRun = sqlite3LogEstFromDouble(pIdxInfo->estimatedCost);
151643 pNew->nOut = sqlite3LogEst(pIdxInfo->estimatedRows);
151647 if( pIdxInfo->idxFlags & SQLITE_INDEX_SCAN_UNIQUE ){
151671 SQLITE_API const char *sqlite3_vtab_collation(sqlite3_index_info *pIdxInfo, int iCons){
151672 HiddenIndexInfo *pHidden = (HiddenIndexInfo*)&pIdxInfo[1];
151674 if( iCons>=0 && iCons<pIdxInfo->nConstraint ){
151676 int iTerm = pIdxInfo->aConstraint[iCons].iTermOffset;
171581 ** Set the pIdxInfo->estimatedRows variable to nRow. Unless this
171585 static void fts3SetEstimatedRows(sqlite3_index_info *pIdxInfo, i64 nRow){
171588 pIdxInfo->estimatedRows = nRow;
171594 ** Set the SQLITE_INDEX_SCAN_UNIQUE flag in pIdxInfo->flags. Unless this
171598 static void fts3SetUniqueFlag(sqlite3_index_info *pIdxInfo){
171601 pIdxInfo->idxFlags |= SQLITE_INDEX_SCAN_UNIQUE;
190904 sqlite3_index_info *pIdxInfo
190917 pConstraint = pIdxInfo->aConstraint;
190918 for(i=0; i<pIdxInfo->nConstraint; i++, pConstraint++){
190941 pIdxInfo->idxNum = 0;
190943 pIdxInfo->estimatedCost = 1.0;
190945 pIdxInfo->aConstraintUsage[i].argvIndex = 1;
190946 pIdxInfo->aConstraintUsage[i].omit = 1;
190948 pIdxInfo->idxNum = 1; /* Only JSON supplied. Plan 1 */
190951 pIdxInfo->aConstraintUsage[i].argvIndex = 2;
190952 pIdxInfo->aConstraintUsage[i].omit = 1;
190953 pIdxInfo->idxNum = 3; /* Both JSON and ROOT are supplied. Plan 3 */
193162 static int rtreeBestIndex(sqlite3_vtab *tab, sqlite3_index_info *pIdxInfo){
193177 for(ii=0; ii<pIdxInfo->nConstraint; ii++){
193178 if( pIdxInfo->aConstraint[ii].op==SQLITE_INDEX_CONSTRAINT_MATCH ){
193183 assert( pIdxInfo->idxStr==0 );
193184 for(ii=0; ii<pIdxInfo->nConstraint && iIdx<(int)(sizeof(zIdxStr)-1); ii++){
193185 struct sqlite3_index_constraint *p = &pIdxInfo->aConstraint[ii];
193193 pIdxInfo->aConstraintUsage[jj].argvIndex = 0;
193194 pIdxInfo->aConstraintUsage[jj].omit = 0;
193196 pIdxInfo->idxNum = 1;
193197 pIdxInfo->aConstraintUsage[ii].argvIndex = 1;
193198 pIdxInfo->aConstraintUsage[jj].omit = 1;
193206 pIdxInfo->estimatedCost = 30.0;
193207 pIdxInfo->estimatedRows = 1;
193208 pIdxInfo->idxFlags = SQLITE_INDEX_SCAN_UNIQUE;
193229 pIdxInfo->aConstraintUsage[ii].argvIndex = (iIdx/2);
193230 pIdxInfo->aConstraintUsage[ii].omit = 1;
193235 pIdxInfo->idxNum = 2;
193236 pIdxInfo->needToFreeIdxStr = 1;
193237 if( iIdx>0 && 0==(pIdxInfo->idxStr = sqlite3_mprintf("%s", zIdxStr)) ){
193242 pIdxInfo->estimatedCost = (double)6.0 * (double)nRow;
193243 pIdxInfo->estimatedRows = nRow;
197036 static int geopolyBestIndex(sqlite3_vtab *tab, sqlite3_index_info *pIdxInfo){
197042 for(ii=0; ii<pIdxInfo->nConstraint; ii++){
197043 struct sqlite3_index_constraint *p = &pIdxInfo->aConstraint[ii];
197059 pIdxInfo->idxNum = 1;
197060 pIdxInfo->idxStr = "rowid";
197061 pIdxInfo->aConstraintUsage[iRowidTerm].argvIndex = 1;
197062 pIdxInfo->aConstraintUsage[iRowidTerm].omit = 1;
197063 pIdxInfo->estimatedCost = 30.0;
197064 pIdxInfo->estimatedRows = 1;
197065 pIdxInfo->idxFlags = SQLITE_INDEX_SCAN_UNIQUE;
197069 pIdxInfo->idxNum = idxNum;
197070 pIdxInfo->idxStr = "rtree";
197071 pIdxInfo->aConstraintUsage[iFuncTerm].argvIndex = 1;
197072 pIdxInfo->aConstraintUsage[iFuncTerm].omit = 0;
197073 pIdxInfo->estimatedCost = 300.0;
197074 pIdxInfo->estimatedRows = 10;
197077 pIdxInfo->idxNum = 4;
197078 pIdxInfo->idxStr = "fullscan";
197079 pIdxInfo->estimatedCost = 3000000.0;
197080 pIdxInfo->estimatedRows = 100000;
204504 static int statBestIndex(sqlite3_vtab *tab, sqlite3_index_info *pIdxInfo){
204515 for(i=0; i<pIdxInfo->nConstraint; i++){
204516 if( pIdxInfo->aConstraint[i].op!=SQLITE_INDEX_CONSTRAINT_EQ ) continue;
204517 if( pIdxInfo->aConstraint[i].usable==0 ){
204521 switch( pIdxInfo->aConstraint[i].iColumn ){
204538 pIdxInfo->aConstraintUsage[iSchema].argvIndex = ++i;
204539 pIdxInfo->aConstraintUsage[iSchema].omit = 1;
204540 pIdxInfo->idxNum |= 0x01;
204543 pIdxInfo->aConstraintUsage[iName].argvIndex = ++i;
204544 pIdxInfo->idxNum |= 0x02;
204547 pIdxInfo->aConstraintUsage[iAgg].argvIndex = ++i;
204548 pIdxInfo->idxNum |= 0x04;
204550 pIdxInfo->estimatedCost = 1.0;
204556 if( ( pIdxInfo->nOrderBy==1
204557 && pIdxInfo->aOrderBy[0].iColumn==0
204558 && pIdxInfo->aOrderBy[0].desc==0
204560 ( pIdxInfo->nOrderBy==2
204561 && pIdxInfo->aOrderBy[0].iColumn==0
204562 && pIdxInfo->aOrderBy[0].desc==0
204563 && pIdxInfo->aOrderBy[1].iColumn==1
204564 && pIdxInfo->aOrderBy[1].desc==0
204567 pIdxInfo->orderByConsumed = 1;
204568 pIdxInfo->idxNum |= 0x08;
205264 static int dbpageBestIndex(sqlite3_vtab *tab, sqlite3_index_info *pIdxInfo){
205272 for(i=0; i<pIdxInfo->nConstraint; i++){
205273 struct sqlite3_index_constraint *p = &pIdxInfo->aConstraint[i];
205281 pIdxInfo->aConstraintUsage[i].argvIndex = 1;
205282 pIdxInfo->aConstraintUsage[i].omit = 1;
205290 pIdxInfo->estimatedCost = 1.0e6;
205293 for(i=0; i<pIdxInfo->nConstraint; i++){
205294 struct sqlite3_index_constraint *p = &pIdxInfo->aConstraint[i];
205296 pIdxInfo->estimatedRows = 1;
205297 pIdxInfo->idxFlags = SQLITE_INDEX_SCAN_UNIQUE;
205298 pIdxInfo->estimatedCost = 1.0;
205299 pIdxInfo->aConstraintUsage[i].argvIndex = iPlan ? 2 : 1;
205300 pIdxInfo->aConstraintUsage[i].omit = 1;
205305 pIdxInfo->idxNum = iPlan;
205307 if( pIdxInfo->nOrderBy>=1
205308 && pIdxInfo->aOrderBy[0].iColumn<=0
205309 && pIdxInfo->aOrderBy[0].desc==0
205311 pIdxInfo->orderByConsumed = 1;
226970 ** Set the SQLITE_INDEX_SCAN_UNIQUE flag in pIdxInfo->flags. Unless this
226974 static void fts5SetUniqueFlag(sqlite3_index_info *pIdxInfo){
226980 pIdxInfo->idxFlags |= SQLITE_INDEX_SCAN_UNIQUE;
234167 sqlite3_index_info *pIdxInfo
234169 pIdxInfo->estimatedCost = (double)500;
234170 pIdxInfo->estimatedRows = 500;