Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Clearer presentation of the logic. No functional changes. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | skip-scan-improvement |
Files: | files | file ages | folders |
SHA1: |
a3dcf6db76cc09bdfedb1bbeba3b359b |
User & Date: | drh 2016-02-22 21:19:54.531 |
Context
2016-02-22
| ||
23:14 | Avoid an unnecessary seek operation some corner-case skip-scan operations. (check-in: 2a6003a937 user: drh tags: trunk) | |
21:19 | Clearer presentation of the logic. No functional changes. (Closed-Leaf check-in: a3dcf6db76 user: drh tags: skip-scan-improvement) | |
20:52 | Avoid an unnecessary seek operation on some corner-case skip-scans. (check-in: 38e837e605 user: drh tags: skip-scan-improvement) | |
Changes
Changes to src/wherecode.c.
︙ | ︙ | |||
1208 1209 1210 1211 1212 1213 1214 | }else if( bSeekPastNull ){ sqlite3VdbeAddOp2(v, OP_Null, 0, regBase+nEq); nConstraint++; startEq = 0; start_constraints = 1; } codeApplyAffinity(pParse, regBase, nConstraint - bSeekPastNull, zStartAff); | | > > > > | 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 | }else if( bSeekPastNull ){ sqlite3VdbeAddOp2(v, OP_Null, 0, regBase+nEq); nConstraint++; startEq = 0; start_constraints = 1; } codeApplyAffinity(pParse, regBase, nConstraint - bSeekPastNull, zStartAff); if( pLoop->nSkip>0 && nConstraint==pLoop->nSkip ){ /* The skip-scan logic inside the call to codeAllEqualityConstraints() ** above has already left the cursor sitting on the correct row, ** so no further seeking is needed */ }else{ op = aStartOp[(start_constraints<<2) + (startEq<<1) + bRev]; assert( op!=0 ); sqlite3VdbeAddOp4Int(v, op, iIdxCur, addrNxt, regBase, nConstraint); VdbeCoverage(v); VdbeCoverageIf(v, op==OP_Rewind); testcase( op==OP_Rewind ); VdbeCoverageIf(v, op==OP_Last); testcase( op==OP_Last ); VdbeCoverageIf(v, op==OP_SeekGT); testcase( op==OP_SeekGT ); |
︙ | ︙ |