Hello all

 

I'm running some general performance tests on SQLite 3.5.9 (embedded C
platform), and I noticed that creating an index seems to use a lot more
memory than I expected.

 

An index on an integer column (30495 rows) uses 1,011,560 bytes.

DB file size increases by 311,296 bytes.

 

An index on a varchar column (average null-terminated text length 18
bytes, 30495 rows) uses 2,180,040 bytes.

DB file size increases by 856,064 bytes.

 

I'm using the static memory allocator (mem3.c), page size 4096, and I
compiled with SQLITE_32BIT_ROWID. I measured the difference in memory
reported by sqlite3_memory_used(). Dropping the index does not return
any of the memory used, and does not reduce the DB file size. Are these
results normal, or is some optimisation possible?

 

Cheers,

Dave Toll.

 

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to