mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-14 00:22:38 +03:00
Change BtreeMoveto so that it can be biased to the right or to the center.
Use a right bias when appending and a center bias when searching. This gives about a 15% reduction in calls to sqlite3VdbeRecordCompare. (CVS 3741) FossilOrigin-Name: ad4a6b1a91bcefd8a4c75e8dc99c1153c72c31a3
This commit is contained in:
@@ -1663,10 +1663,10 @@ int sqlite3VdbeCursorMoveto(Cursor *p){
|
||||
#endif
|
||||
assert( p->isTable );
|
||||
if( p->isTable ){
|
||||
rc = sqlite3BtreeMoveto(p->pCursor, 0, p->movetoTarget, &res);
|
||||
rc = sqlite3BtreeMoveto(p->pCursor, 0, p->movetoTarget, 0, &res);
|
||||
}else{
|
||||
rc = sqlite3BtreeMoveto(p->pCursor,(char*)&p->movetoTarget,
|
||||
sizeof(i64),&res);
|
||||
sizeof(i64), 0, &res);
|
||||
}
|
||||
if( rc ) return rc;
|
||||
*p->pIncrKey = 0;
|
||||
|
||||
Reference in New Issue
Block a user