1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-10-21 11:13:54 +03:00

Change the btree node balancers to sort nodes into accending order. This

improves insert and delete speed by 25%. (CVS 409)

FossilOrigin-Name: abbb999d4fc3fe142567b6ede5e625e7bf0da714
This commit is contained in:
drh
2002-03-02 19:00:31 +00:00
parent 832508b7ea
commit f9ffac96a7
4 changed files with 52 additions and 11 deletions

View File

@@ -16,7 +16,7 @@
** sqliteRegisterBuildinFunctions() found at the bottom of the file.
** All other code has file scope.
**
** $Id: func.c,v 1.12 2002/02/28 04:00:12 drh Exp $
** $Id: func.c,v 1.13 2002/03/02 19:00:31 drh Exp $
*/
#include <ctype.h>
#include <math.h>
@@ -189,6 +189,13 @@ static void ifnullFunc(sqlite_func *context, int argc, const char **argv){
}
}
/*
** Implementation of random(). Return a random integer.
*/
static void randomFunc(sqlite_func *context, int argc, const char **argv){
sqlite_set_result_int(context, sqliteRandomInteger());
}
/*
** An instance of the following structure holds the context of a
** sum() or avg() aggregate computation.
@@ -375,7 +382,7 @@ void sqliteRegisterBuildinFunctions(sqlite *db){
{ "coalesce", -1, ifnullFunc },
{ "coalesce", 0, 0 },
{ "coalesce", 1, 0 },
{ "random", -1, randomFunc },
};
static struct {
char *zName;