Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Fix the Parse.nQueryLoop state variable to work with NGQP. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | nextgen-query-plan-exp |
Files: | files | file ages | folders |
SHA1: |
f1cac24f06b9c71cfa472fdcf2da4cd8 |
User & Date: | drh 2013-06-11 13:30:04.431 |
Context
2013-06-11
| ||
18:59 | Improved processing of DISTINCT. (check-in: ba897100fe user: drh tags: nextgen-query-plan-exp) | |
13:30 | Fix the Parse.nQueryLoop state variable to work with NGQP. (check-in: f1cac24f06 user: drh tags: nextgen-query-plan-exp) | |
02:36 | Use a logarithmic rather than linear cost and row-count measures. Do not report row count estimates in EQP output. (check-in: b777b1097d user: drh tags: nextgen-query-plan-exp) | |
Changes
Changes to src/expr.c.
︙ | |||
1592 1593 1594 1595 1596 1597 1598 | 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 | - + - - + + | } } if( eType==0 ){ /* Could not found an existing table or index to use as the RHS b-tree. ** We will have to generate an ephemeral table to do the job. */ |
︙ |
Changes to src/prepare.c.
︙ | |||
588 589 590 591 592 593 594 | 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 | - + | } } } sqlite3VtabUnlockList(db); pParse->db = db; |
︙ | |||
610 611 612 613 614 615 616 | 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 | - + | pParse->zTail = &zSql[pParse->zTail-zSqlCopy]; }else{ pParse->zTail = &zSql[nBytes]; } }else{ sqlite3RunParser(pParse, zSql, &zErrMsg); } |
︙ |
Changes to src/sqliteInt.h.
︙ | |||
2222 2223 2224 2225 2226 2227 2228 | 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 | - + | TableLock *aTableLock; /* Required table locks for shared-cache mode */ #endif AutoincInfo *pAinc; /* Information about AUTOINCREMENT counters */ /* Information used while coding trigger programs. */ Parse *pToplevel; /* Parse structure for main program (or NULL) */ Table *pTriggerTab; /* Table triggers are being coded for */ |
︙ |
Changes to src/where.c.
︙ | |||
354 355 356 357 358 359 360 | 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 | - + | int iTop; /* The very beginning of the WHERE loop */ int iContinue; /* Jump here to continue with next record */ int iBreak; /* Jump here to break out of the loop */ int nLevel; /* Number of nested loop */ WhereMaskSet sMaskSet; /* Map cursor numbers to bitmasks */ WhereClause sWC; /* Decomposition of the WHERE clause */ WhereLoop *pLoops; /* List of all WhereLoop objects */ |
︙ | |||
3095 3096 3097 3098 3099 3100 3101 | 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 | - + | ((flags & WHERE_TEMP_INDEX)?"": pLoop->u.btree.pIndex->zName), zWhere ); sqlite3DbFree(db, zWhere); }else if( (flags & WHERE_IPK)!=0 && (flags & WHERE_CONSTRAINT)!=0 ){ zMsg = sqlite3MAppendf(db, zMsg, "%s USING INTEGER PRIMARY KEY", zMsg); |
︙ | |||
4428 4429 4430 4431 4432 4433 4434 | 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 | - + | pProbe = &sPk; } rSize = whereCostFromInt(pSrc->pTab->nRowEst); rLogSize = estLog(rSize); /* Automatic indexes */ if( !pBuilder->pBest |
︙ | |||
5070 5071 5072 5073 5074 5075 5076 | 5070 5071 5072 5073 5074 5075 5076 5077 5078 5079 5080 5081 5082 5083 5084 | - + | memset(aFrom, 0, sizeof(aFrom[0])); pX = (WhereLoop**)(aFrom+mxChoice); for(ii=mxChoice*2, pFrom=aTo; ii>0; ii--, pFrom++, pX += nLoop){ pFrom->aLoop = pX; } /* Seed the search with a single WherePath containing zero WhereLoops */ |
︙ | |||
5611 5612 5613 5614 5615 5616 5617 5618 5619 5620 5621 5622 5623 5624 | 5611 5612 5613 5614 5615 5616 5617 5618 5619 5620 5621 5622 5623 5624 5625 | + | } for(ii=0; ii<nTabList; ii++){ whereLoopPrint(pWInfo->a[ii].pWLoop, pTabList); } } #endif WHERETRACE(("*** Optimizer Finished ***\n")); pWInfo->pParse->nQueryLoop += pWInfo->nRowOut; #if 0 /* FIXME: Add this back in? */ /* If the caller is an UPDATE or DELETE statement that is requesting ** to use a one-pass algorithm, determine if this is appropriate. ** The one-pass algorithm only works if the WHERE clause constraints ** the statement to update a single row. */ |
︙ |