Home
last modified time | relevance | path

Searched refs:pIdxInfo (Results 1 – 25 of 43) sorted by relevance

12

/sqlite-3.40.0/ext/misc/
H A Dqpvtab.c340 sqlite3_index_info *pIdxInfo in qpvtabBestIndex() argument
346 for(i=0; i<pIdxInfo->nConstraint; i++){ in qpvtabBestIndex()
349 int op = pIdxInfo->aConstraint[i].op; in qpvtabBestIndex()
356 if( pIdxInfo->idxNum & 0x002 ) pIdxInfo->orderByConsumed = 1; in qpvtabBestIndex()
368 pIdxInfo->aConstraint[i].usable); in qpvtabBestIndex()
377 for(i=0; i<pIdxInfo->nConstraint; i++){ in qpvtabBestIndex()
393 for(i=0; i<pIdxInfo->nOrderBy; i++){ in qpvtabBestIndex()
397 pIdxInfo->aOrderBy[i].desc in qpvtabBestIndex()
404 pIdxInfo->estimatedCost = (double)10; in qpvtabBestIndex()
405 pIdxInfo->estimatedRows = 10; in qpvtabBestIndex()
[all …]
H A Dwholenumber.c180 sqlite3_index_info *pIdxInfo in wholenumberBestIndex() argument
188 pConstraint = pIdxInfo->aConstraint; in wholenumberBestIndex()
208 pIdxInfo->idxNum = idxNum; in wholenumberBestIndex()
211 pIdxInfo->aConstraintUsage[ltIdx].omit = 1; in wholenumberBestIndex()
215 pIdxInfo->aConstraintUsage[gtIdx].omit = 1; in wholenumberBestIndex()
217 if( pIdxInfo->nOrderBy==1 in wholenumberBestIndex()
218 && pIdxInfo->aOrderBy[0].desc==0 in wholenumberBestIndex()
220 pIdxInfo->orderByConsumed = 1; in wholenumberBestIndex()
223 pIdxInfo->estimatedCost = 1e99; in wholenumberBestIndex()
225 pIdxInfo->estimatedCost = (double)5; in wholenumberBestIndex()
[all …]
H A Dcarray.c323 sqlite3_index_info *pIdxInfo in carrayBestIndex() argument
331 pConstraint = pIdxInfo->aConstraint; in carrayBestIndex()
349 pIdxInfo->aConstraintUsage[ptrIdx].omit = 1; in carrayBestIndex()
350 pIdxInfo->estimatedCost = (double)1; in carrayBestIndex()
351 pIdxInfo->estimatedRows = 100; in carrayBestIndex()
352 pIdxInfo->idxNum = 1; in carrayBestIndex()
356 pIdxInfo->idxNum = 2; in carrayBestIndex()
360 pIdxInfo->idxNum = 3; in carrayBestIndex()
364 pIdxInfo->estimatedCost = (double)2147483647; in carrayBestIndex()
365 pIdxInfo->estimatedRows = 2147483647; in carrayBestIndex()
[all …]
H A Dseries.c327 sqlite3_index_info *pIdxInfo in seriesBestIndex() argument
343 pConstraint = pIdxInfo->aConstraint; in seriesBestIndex()
344 for(i=0; i<pIdxInfo->nConstraint; i++, pConstraint++){ in seriesBestIndex()
362 pIdxInfo->aConstraintUsage[j].argvIndex = ++nArg; in seriesBestIndex()
387 pIdxInfo->estimatedCost = (double)(2 - ((idxNum&4)!=0)); in seriesBestIndex()
388 pIdxInfo->estimatedRows = 1000; in seriesBestIndex()
389 if( pIdxInfo->nOrderBy>=1 && pIdxInfo->aOrderBy[0].iColumn==0 ){ in seriesBestIndex()
390 if( pIdxInfo->aOrderBy[0].desc ){ in seriesBestIndex()
395 pIdxInfo->orderByConsumed = 1; in seriesBestIndex()
401 pIdxInfo->estimatedRows = 2147483647; in seriesBestIndex()
[all …]
H A Dclosure.c833 pConstraint = pIdxInfo->aConstraint; in closureBestIndex()
841 pIdxInfo->aConstraintUsage[i].argvIndex = 1; in closureBestIndex()
842 pIdxInfo->aConstraintUsage[i].omit = 1; in closureBestIndex()
862 pIdxInfo->aConstraintUsage[i].omit = 1; in closureBestIndex()
871 pIdxInfo->aConstraintUsage[i].omit = 1; in closureBestIndex()
879 pIdxInfo->aConstraintUsage[i].omit = 1; in closureBestIndex()
903 pIdxInfo->idxNum = iPlan; in closureBestIndex()
904 if( pIdxInfo->nOrderBy==1 in closureBestIndex()
906 && pIdxInfo->aOrderBy[0].desc==0 in closureBestIndex()
908 pIdxInfo->orderByConsumed = 1; in closureBestIndex()
[all …]
H A Dprefixes.c201 sqlite3_index_info *pIdxInfo in prefixesBestIndex() argument
208 for(i=0, p=pIdxInfo->aConstraint; i<pIdxInfo->nConstraint; i++, p++){ in prefixesBestIndex()
212 pIdxInfo->aConstraintUsage[i].argvIndex = 1; in prefixesBestIndex()
213 pIdxInfo->aConstraintUsage[i].omit = 1; in prefixesBestIndex()
214 pIdxInfo->estimatedCost = (double)10; in prefixesBestIndex()
215 pIdxInfo->estimatedRows = 10; in prefixesBestIndex()
218 pIdxInfo->estimatedCost = (double)1000000000; in prefixesBestIndex()
219 pIdxInfo->estimatedRows = 1000000000; in prefixesBestIndex()
H A Dcompletion.c406 sqlite3_index_info *pIdxInfo in completionBestIndex() argument
416 pConstraint = pIdxInfo->aConstraint; in completionBestIndex()
417 for(i=0; i<pIdxInfo->nConstraint; i++, pConstraint++){ in completionBestIndex()
432 pIdxInfo->aConstraintUsage[prefixIdx].argvIndex = ++nArg; in completionBestIndex()
433 pIdxInfo->aConstraintUsage[prefixIdx].omit = 1; in completionBestIndex()
436 pIdxInfo->aConstraintUsage[wholelineIdx].argvIndex = ++nArg; in completionBestIndex()
437 pIdxInfo->aConstraintUsage[wholelineIdx].omit = 1; in completionBestIndex()
439 pIdxInfo->idxNum = idxNum; in completionBestIndex()
440 pIdxInfo->estimatedCost = (double)5000 - 1000*nArg; in completionBestIndex()
441 pIdxInfo->estimatedRows = 500 - 100*nArg; in completionBestIndex()
H A Dexplain.c237 sqlite3_index_info *pIdxInfo in explainBestIndex() argument
243 pIdxInfo->estimatedRows = 500; in explainBestIndex()
244 for(i=0; i<pIdxInfo->nConstraint; i++){ in explainBestIndex()
245 struct sqlite3_index_constraint *p = &pIdxInfo->aConstraint[i]; in explainBestIndex()
255 pIdxInfo->estimatedCost = 10.0; in explainBestIndex()
256 pIdxInfo->idxNum = 1; in explainBestIndex()
257 pIdxInfo->aConstraintUsage[idx].argvIndex = 1; in explainBestIndex()
258 pIdxInfo->aConstraintUsage[idx].omit = 1; in explainBestIndex()
H A Dbtreeinfo.c159 static int binfoBestIndex(sqlite3_vtab *tab, sqlite3_index_info *pIdxInfo){ in binfoBestIndex() argument
161 pIdxInfo->estimatedCost = 10000.0; /* Cost estimate */ in binfoBestIndex()
162 pIdxInfo->estimatedRows = 100; in binfoBestIndex()
163 for(i=0; i<pIdxInfo->nConstraint; i++){ in binfoBestIndex()
164 struct sqlite3_index_constraint *p = &pIdxInfo->aConstraint[i]; in binfoBestIndex()
169 pIdxInfo->estimatedCost = 1000.0; in binfoBestIndex()
170 pIdxInfo->idxNum = 1; in binfoBestIndex()
171 pIdxInfo->aConstraintUsage[i].argvIndex = 1; in binfoBestIndex()
172 pIdxInfo->aConstraintUsage[i].omit = 1; in binfoBestIndex()
H A Dunionvtab.c1268 sqlite3_index_info *pIdxInfo in unionBestIndex() argument
1276 for(i=0; i<pIdxInfo->nConstraint; i++){ in unionBestIndex()
1296 pIdxInfo->estimatedRows = 1; in unionBestIndex()
1298 pIdxInfo->estimatedCost = 3.0; in unionBestIndex()
1301 pIdxInfo->aConstraintUsage[iEq].omit = 1; in unionBestIndex()
1309 pIdxInfo->aConstraintUsage[iLt].omit = 1; in unionBestIndex()
1310 idxNum |= pIdxInfo->aConstraint[iLt].op; in unionBestIndex()
1315 pIdxInfo->aConstraintUsage[iGt].omit = 1; in unionBestIndex()
1316 idxNum |= pIdxInfo->aConstraint[iGt].op; in unionBestIndex()
1318 pIdxInfo->estimatedRows = nRow; in unionBestIndex()
[all …]
H A Dfossildelta.c1013 sqlite3_index_info *pIdxInfo in deltaparsevtabBestIndex() argument
1016 for(i=0; i<pIdxInfo->nConstraint; i++){ in deltaparsevtabBestIndex()
1018 if( pIdxInfo->aConstraint[i].usable==0 ) continue; in deltaparsevtabBestIndex()
1020 pIdxInfo->aConstraintUsage[i].argvIndex = 1; in deltaparsevtabBestIndex()
1021 pIdxInfo->aConstraintUsage[i].omit = 1; in deltaparsevtabBestIndex()
1022 pIdxInfo->estimatedCost = (double)1; in deltaparsevtabBestIndex()
1023 pIdxInfo->estimatedRows = 10; in deltaparsevtabBestIndex()
1024 pIdxInfo->idxNum = 1; in deltaparsevtabBestIndex()
1027 pIdxInfo->idxNum = 0; in deltaparsevtabBestIndex()
1028 pIdxInfo->estimatedCost = (double)0x7fffffff; in deltaparsevtabBestIndex()
[all …]
H A Dfileio.c896 sqlite3_index_info *pIdxInfo in fsdirBestIndex() argument
906 pConstraint = pIdxInfo->aConstraint; in fsdirBestIndex()
936 pIdxInfo->idxNum = 0; in fsdirBestIndex()
939 pIdxInfo->estimatedRows = 0x7fffffff; in fsdirBestIndex()
941 pIdxInfo->aConstraintUsage[idxPath].omit = 1; in fsdirBestIndex()
942 pIdxInfo->aConstraintUsage[idxPath].argvIndex = 1; in fsdirBestIndex()
944 pIdxInfo->aConstraintUsage[idxDir].omit = 1; in fsdirBestIndex()
946 pIdxInfo->idxNum = 2; in fsdirBestIndex()
947 pIdxInfo->estimatedCost = 10.0; in fsdirBestIndex()
949 pIdxInfo->idxNum = 1; in fsdirBestIndex()
[all …]
H A Dfuzzer.c1087 pConstraint = pIdxInfo->aConstraint; in fuzzerBestIndex()
1088 for(i=0; i<pIdxInfo->nConstraint; i++, pConstraint++){ in fuzzerBestIndex()
1099 pIdxInfo->aConstraintUsage[i].argvIndex = 1; in fuzzerBestIndex()
1100 pIdxInfo->aConstraintUsage[i].omit = 1; in fuzzerBestIndex()
1117 pIdxInfo->aConstraintUsage[i].omit = 1; in fuzzerBestIndex()
1131 pIdxInfo->idxNum = iPlan; in fuzzerBestIndex()
1132 if( pIdxInfo->nOrderBy==1 in fuzzerBestIndex()
1133 && pIdxInfo->aOrderBy[0].iColumn==1 in fuzzerBestIndex()
1134 && pIdxInfo->aOrderBy[0].desc==0 in fuzzerBestIndex()
1136 pIdxInfo->orderByConsumed = 1; in fuzzerBestIndex()
[all …]
H A Dspellfix.c2226 pConstraint = pIdxInfo->aConstraint; in spellfix1BestIndex()
2236 pIdxInfo->aConstraintUsage[i].argvIndex = 1; in spellfix1BestIndex()
2237 pIdxInfo->aConstraintUsage[i].omit = 1; in spellfix1BestIndex()
2292 pIdxInfo->idxNum = iPlan; in spellfix1BestIndex()
2293 if( pIdxInfo->nOrderBy==1 in spellfix1BestIndex()
2295 && pIdxInfo->aOrderBy[0].desc==0 in spellfix1BestIndex()
2315 pIdxInfo->estimatedCost = 1e5; in spellfix1BestIndex()
2317 pIdxInfo->idxNum = SPELLFIX_IDXNUM_ROWID; in spellfix1BestIndex()
2320 pIdxInfo->estimatedCost = 5; in spellfix1BestIndex()
2322 pIdxInfo->idxNum = 0; in spellfix1BestIndex()
[all …]
H A Damatch.c1354 sqlite3_index_info *pIdxInfo in amatchBestIndex() argument
1363 pConstraint = pIdxInfo->aConstraint; in amatchBestIndex()
1371 pIdxInfo->aConstraintUsage[i].argvIndex = 1; in amatchBestIndex()
1372 pIdxInfo->aConstraintUsage[i].omit = 1; in amatchBestIndex()
1387 pIdxInfo->aConstraintUsage[i].omit = 1; in amatchBestIndex()
1400 pIdxInfo->idxNum = iPlan; in amatchBestIndex()
1401 if( pIdxInfo->nOrderBy==1 in amatchBestIndex()
1402 && pIdxInfo->aOrderBy[0].iColumn==1 in amatchBestIndex()
1403 && pIdxInfo->aOrderBy[0].desc==0 in amatchBestIndex()
1405 pIdxInfo->orderByConsumed = 1; in amatchBestIndex()
[all …]
/sqlite-3.40.0/src/
H A Ddbpage.c118 for(i=0; i<pIdxInfo->nConstraint; i++){ in dbpageBestIndex()
136 pIdxInfo->estimatedCost = 1.0e6; in dbpageBestIndex()
139 for(i=0; i<pIdxInfo->nConstraint; i++){ in dbpageBestIndex()
142 pIdxInfo->estimatedRows = 1; in dbpageBestIndex()
144 pIdxInfo->estimatedCost = 1.0; in dbpageBestIndex()
151 pIdxInfo->idxNum = iPlan; in dbpageBestIndex()
153 if( pIdxInfo->nOrderBy>=1 in dbpageBestIndex()
154 && pIdxInfo->aOrderBy[0].iColumn<=0 in dbpageBestIndex()
155 && pIdxInfo->aOrderBy[0].desc==0 in dbpageBestIndex()
157 pIdxInfo->orderByConsumed = 1; in dbpageBestIndex()
[all …]
H A Dtest_bestindex.c393 sqlite3_index_info *pIdxInfo in testBestIndexObjConstraints() argument
398 for(ii=0; ii<pIdxInfo->nConstraint; ii++){ in testBestIndexObjConstraints()
457 sqlite3_index_info *pIdxInfo in testBestIndexObjOrderby() argument
462 for(ii=0; ii<pIdxInfo->nOrderBy; ii++){ in testBestIndexObjOrderby()
539 testBestIndexObjConstraints(interp, pIdxInfo); in testBestIndexObj()
543 testBestIndexObjOrderby(interp, pIdxInfo); in testBestIndexObj()
551 int bDistinct = sqlite3_vtab_distinct(pIdxInfo); in testBestIndexObj()
578 rc = sqlite3_vtab_rhs_value(pIdxInfo, iCons, &pVal); in testBestIndexObj()
657 sqlite3_free(pIdxInfo->idxStr); in tclBestIndex()
659 pIdxInfo->needToFreeIdxStr = 1; in tclBestIndex()
[all …]
H A Dtest_fs.c186 pIdxInfo->estimatedCost = 1000000000.0; in fsdirBestIndex()
188 for(ii=0; ii<pIdxInfo->nConstraint; ii++){ in fsdirBestIndex()
195 pIdxInfo->idxNum = 1; in fsdirBestIndex()
196 pIdxInfo->estimatedCost = 1.0; in fsdirBestIndex()
393 for(ii=0; ii<pIdxInfo->nConstraint; ii++){ in fstreeBestIndex()
402 pIdxInfo->idxNum = p->op; in fstreeBestIndex()
404 pIdxInfo->estimatedCost = 100000.0; in fstreeBestIndex()
409 pIdxInfo->estimatedCost = 1000000000.0; in fstreeBestIndex()
777 for(ii=0; ii<pIdxInfo->nConstraint; ii++){ in fsBestIndex()
785 pIdxInfo->idxNum = 1; in fsBestIndex()
[all …]
H A Ddbstat.c250 pIdxInfo->idxNum |= 0x01; in statBestIndex()
254 pIdxInfo->idxNum |= 0x02; in statBestIndex()
258 pIdxInfo->idxNum |= 0x04; in statBestIndex()
260 pIdxInfo->estimatedCost = 1.0; in statBestIndex()
266 if( ( pIdxInfo->nOrderBy==1 in statBestIndex()
268 && pIdxInfo->aOrderBy[0].desc==0 in statBestIndex()
270 ( pIdxInfo->nOrderBy==2 in statBestIndex()
272 && pIdxInfo->aOrderBy[0].desc==0 in statBestIndex()
274 && pIdxInfo->aOrderBy[1].desc==0 in statBestIndex()
277 pIdxInfo->orderByConsumed = 1; in statBestIndex()
[all …]
H A Dvdbevtab.c357 sqlite3_index_info *pIdxInfo in bytecodevtabBestIndex() argument
364 pIdxInfo->estimatedCost = (double)100; in bytecodevtabBestIndex()
365 pIdxInfo->estimatedRows = 100; in bytecodevtabBestIndex()
366 pIdxInfo->idxNum = 0; in bytecodevtabBestIndex()
367 for(i=0, p=pIdxInfo->aConstraint; i<pIdxInfo->nConstraint; i++, p++){ in bytecodevtabBestIndex()
371 pIdxInfo->aConstraintUsage[i].omit = 1; in bytecodevtabBestIndex()
372 pIdxInfo->aConstraintUsage[i].argvIndex = 1; in bytecodevtabBestIndex()
375 pIdxInfo->aConstraintUsage[i].omit = 1; in bytecodevtabBestIndex()
376 pIdxInfo->idxNum = 1; in bytecodevtabBestIndex()
H A Dtest8.c854 zCol = echoSelectList(pVtab, pIdxInfo); in echoBestIndex()
859 for(ii=0; ii<pIdxInfo->nConstraint; ii++){ in echoBestIndex()
920 if( pIdxInfo->nOrderBy==1 && ( in echoBestIndex()
921 pIdxInfo->aOrderBy->iColumn<0 || in echoBestIndex()
923 int iCol = pIdxInfo->aOrderBy->iColumn; in echoBestIndex()
928 pIdxInfo->orderByConsumed = 1; in echoBestIndex()
937 pIdxInfo->idxNum = hashString(zQuery); in echoBestIndex()
938 pIdxInfo->idxStr = zQuery; in echoBestIndex()
939 pIdxInfo->needToFreeIdxStr = 1; in echoBestIndex()
941 pIdxInfo->estimatedCost = cost; in echoBestIndex()
[all …]
H A Dwhere.c1183 sqlite3_index_info *pIdxInfo; in allocateIndexInfo() local
1279 pIdxInfo = sqlite3DbMallocZero(pParse->db, sizeof(*pIdxInfo) in allocateIndexInfo()
1283 if( pIdxInfo==0 ){ in allocateIndexInfo()
1343 pIdxInfo->nConstraint = j; in allocateIndexInfo()
1354 pIdxInfo->nOrderBy = j; in allocateIndexInfo()
1357 return pIdxInfo; in allocateIndexInfo()
1367 assert( pIdxInfo!=0 ); in freeIndexInfo()
1375 sqlite3DbFree(db, pIdxInfo); in freeIndexInfo()
3714 pIdxInfo->idxStr = 0; in whereLoopAddVirtualOne()
3715 pIdxInfo->idxNum = 0; in whereLoopAddVirtualOne()
[all …]
/sqlite-3.40.0/ext/lsm1/
H A Dlsm_vtab.c833 sqlite3_index_info *pIdxInfo in lsm1BestIndex() argument
844 pConstraint = pIdxInfo->aConstraint; in lsm1BestIndex()
897 pIdxInfo->estimatedCost = (double)1; in lsm1BestIndex()
898 pIdxInfo->estimatedRows = 1; in lsm1BestIndex()
899 pIdxInfo->orderByConsumed = 1; in lsm1BestIndex()
901 pIdxInfo->estimatedCost = (double)100; in lsm1BestIndex()
902 pIdxInfo->estimatedRows = 100; in lsm1BestIndex()
904 pIdxInfo->estimatedCost = (double)5000; in lsm1BestIndex()
905 pIdxInfo->estimatedRows = 5000; in lsm1BestIndex()
909 pIdxInfo->estimatedRows = 2147483647; in lsm1BestIndex()
[all …]
/sqlite-3.40.0/tool/
H A Dfuzzershell.c597 sqlite3_index_info *pIdxInfo in seriesBestIndex() argument
607 pConstraint = pIdxInfo->aConstraint; in seriesBestIndex()
608 for(i=0; i<pIdxInfo->nConstraint; i++, pConstraint++){ in seriesBestIndex()
631 pIdxInfo->aConstraintUsage[stopIdx].argvIndex = ++nArg; in seriesBestIndex()
642 pIdxInfo->estimatedRows = 1000; in seriesBestIndex()
643 if( pIdxInfo->nOrderBy==1 ){ in seriesBestIndex()
644 if( pIdxInfo->aOrderBy[0].desc ) idxNum |= 8; in seriesBestIndex()
645 pIdxInfo->orderByConsumed = 1; in seriesBestIndex()
651 pIdxInfo->estimatedCost = (double)2147483647; in seriesBestIndex()
652 pIdxInfo->estimatedRows = 2147483647; in seriesBestIndex()
[all …]
/sqlite-3.40.0/ext/rtree/
H A Dgeopoly.c1496 pIdxInfo->idxNum = 1; in geopolyBestIndex()
1497 pIdxInfo->idxStr = "rowid"; in geopolyBestIndex()
1500 pIdxInfo->estimatedCost = 30.0; in geopolyBestIndex()
1501 pIdxInfo->estimatedRows = 1; in geopolyBestIndex()
1506 pIdxInfo->idxNum = idxNum; in geopolyBestIndex()
1507 pIdxInfo->idxStr = "rtree"; in geopolyBestIndex()
1510 pIdxInfo->estimatedCost = 300.0; in geopolyBestIndex()
1511 pIdxInfo->estimatedRows = 10; in geopolyBestIndex()
1514 pIdxInfo->idxNum = 4; in geopolyBestIndex()
1515 pIdxInfo->idxStr = "fullscan"; in geopolyBestIndex()
[all …]

12