1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-08 14:02:16 +03:00

Always provide the BTREE_BULKLOAD hint, even when SQLITE_ENABLE_CURSOR_HINTS

is not defined, as that hint gives a 4% performance increase.

FossilOrigin-Name: 83a844357e132683ab3d88eee0fe32a8beeb6662
This commit is contained in:
drh
2015-08-14 23:57:04 +00:00
parent 1eb6eeb829
commit 0403cb3012
5 changed files with 28 additions and 42 deletions

View File

@@ -3384,10 +3384,12 @@ case OP_OpenWrite:
open_cursor_set_hints:
assert( OPFLAG_BULKCSR==BTREE_BULKLOAD );
assert( OPFLAG_SEEKEQ==BTREE_SEEK_EQ );
#ifdef SQLITE_ENABLE_CURSOR_HINTS
testcase( pOp->p5 & OPFLAG_BULKCSR );
#ifdef SQLITE_ENABLE_CURSOR_HINT
testcase( pOp->p2 & OPFLAG_SEEKEQ );
#endif
sqlite3BtreeCursorHint(pCur->pCursor, BTREE_HINT_FLAGS,
(pOp->p5 & (OPFLAG_BULKCSR|OPFLAG_SEEKEQ)));
#endif
break;
}