mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-08 14:02:16 +03:00
Reduce the CPU used by CREATE INDEX statements by taking better advantage of the fact that keys are inserted in sorted order.
FossilOrigin-Name: 592cdc5d7254be7032aa9c0b03405a74ca060b51
This commit is contained in:
@@ -4480,7 +4480,7 @@ case OP_NullRow: {
|
||||
break;
|
||||
}
|
||||
|
||||
/* Opcode: Last P1 P2 * * *
|
||||
/* Opcode: Last P1 P2 P3 * *
|
||||
**
|
||||
** The next use of the Rowid or Column or Prev instruction for P1
|
||||
** will refer to the last entry in the database table or index.
|
||||
@@ -4507,6 +4507,7 @@ case OP_Last: { /* jump */
|
||||
pC->nullRow = (u8)res;
|
||||
pC->deferredMoveto = 0;
|
||||
pC->cacheStatus = CACHE_STALE;
|
||||
pC->seekResult = pOp->p3;
|
||||
#ifdef SQLITE_DEBUG
|
||||
pC->seekOp = OP_Last;
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user