/ Changes On Branch skip-scan-improvement
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Changes In Branch skip-scan-improvement Excluding Merge-Ins

This is equivalent to a diff from 64386fa339 to a3dcf6db76

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)
16:32
Merge the master-journal optimization and other recent changes from trunk. (check-in: 18c3ab4784 user: drh tags: apple-osx)
16:04
Always use the sqlite3VdbeDeleteAuxdata() routine for clearing auxdata on function parameter, rather than having a separate deleteAuxdataFromFrame() for doing the job for trigger frames. (check-in: 64386fa339 user: drh tags: trunk)
14:57
Avoid creating a master journal unless two or more databases in the transaction can actually benefit from that master journal. (check-in: 3ed1890612 user: drh tags: trunk)

Changes to src/wherecode.c.

1208
1209
1210
1211
1212
1213
1214





1215
1216
1217
1218
1219
1220
1221
1222
1223
1224











1225
1226
1227
1228
1229
1230
1231
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219










1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237







+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+







    }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 );
    VdbeCoverageIf(v, op==OP_SeekGE);  testcase( op==OP_SeekGE );
    VdbeCoverageIf(v, op==OP_SeekLE);  testcase( op==OP_SeekLE );
    VdbeCoverageIf(v, op==OP_SeekLT);  testcase( op==OP_SeekLT );
      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 );
      VdbeCoverageIf(v, op==OP_SeekGE);  testcase( op==OP_SeekGE );
      VdbeCoverageIf(v, op==OP_SeekLE);  testcase( op==OP_SeekLE );
      VdbeCoverageIf(v, op==OP_SeekLT);  testcase( op==OP_SeekLT );
    }

    /* Load the value for the inequality constraint at the end of the
    ** range (if any).
    */
    nConstraint = nEq;
    if( pRangeEnd ){
      Expr *pRight = pRangeEnd->pExpr->pRight;