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:
@@ -12,7 +12,7 @@
|
||||
** This file contains C code routines that are called by the parser
|
||||
** to handle SELECT statements in SQLite.
|
||||
**
|
||||
** $Id: select.c,v 1.330 2007/03/02 07:27:00 danielk1977 Exp $
|
||||
** $Id: select.c,v 1.331 2007/03/29 05:51:49 drh Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
|
||||
@@ -535,7 +535,7 @@ static int selectInnerLoop(
|
||||
}else{
|
||||
sqlite3VdbeAddOp(v, OP_NewRowid, iParm, 0);
|
||||
sqlite3VdbeAddOp(v, OP_Pull, 1, 0);
|
||||
sqlite3VdbeAddOp(v, OP_Insert, iParm, 0);
|
||||
sqlite3VdbeAddOp(v, OP_Insert, iParm, OPFLAG_APPEND);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -714,7 +714,7 @@ static void generateSortTail(
|
||||
case SRT_EphemTab: {
|
||||
sqlite3VdbeAddOp(v, OP_NewRowid, iParm, 0);
|
||||
sqlite3VdbeAddOp(v, OP_Pull, 1, 0);
|
||||
sqlite3VdbeAddOp(v, OP_Insert, iParm, 0);
|
||||
sqlite3VdbeAddOp(v, OP_Insert, iParm, OPFLAG_APPEND);
|
||||
break;
|
||||
}
|
||||
#ifndef SQLITE_OMIT_SUBQUERY
|
||||
|
||||
Reference in New Issue
Block a user