1
0
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:
drh
2007-03-29 05:51:49 +00:00
parent f1d68b3096
commit e4d9081307
13 changed files with 101 additions and 67 deletions

View File

@@ -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;