Babu, Lokesh wrote:
sorry I forgot to mention the sqlite version that I'm using, its SQLite
3.3.8.
Below is the sample code that I tried,
static char *database_name = ":memory:";
static sqlite3* db_handle;
#define PRINT_TIME \
{ \
unsigned long millisec = clock(); \
sorry I forgot to mention the sqlite version that I'm using, its SQLite
3.3.8.
Below is the sample code that I tried,
static char *database_name = ":memory:";
static sqlite3* db_handle;
#define PRINT_TIME \
{ \
unsigned long millisec = clock(); \
printf("milliseconds = %ld\n",
Well, rough calculations indicate that the situation that sqlite
preallocates about an additional 3 rows every time a new ROWID is
assigned (on the fairly common use case that ROWID is always
monotonically increasing). Assuming that this corner case is not
accounted for, it could be that when
Could it be that you're seeing the btree optimization around in-order
insertion? From btree.c:
#ifndef SQLITE_OMIT_QUICKBALANCE
/*
** A special case: If a new entry has just been inserted into a
** table (that is, a btree with integer keys and all data at the leaves)
** and the new entry
Dear all,
I'll reframe the question again, If ROWID(hidden column/b-tree key/internal
to all table) is changed manually, means I'll insert some unique values in
random order / in descending order (say from 1 to 1), the memory
occupied increases more. why? I observed entire table is getting
My question is how you're measuring the memory useage? Are you
accounting for the space overhead of the various bookkeeping sqlite
needs (i.e. master table)? The way you're creating you're table implies
you're not using autoincrement for the integer field - are you
accounting for the extra
It could be malloc fragmentation.
Which sqlite version, operating system, and malloc implementation are you using?
--- "Babu, Lokesh" <[EMAIL PROTECTED]> wrote:
> Say I have 3 columns in one Table, with one INTEGER, two TEXT columns, If
> ROWID is manually inserted and made descending for 1
Dear All,
Say I have 3 columns in one Table, with one INTEGER, two TEXT columns, If
ROWID is manually inserted and made descending for 1 records from 1
to 1, (or even if random number for ROWID - both these cases), the memory
occupied is more. Why is this so?
Is that indexing happens, If
8 matches
Mail list logo