On 9 Nov 2011, at 4:42pm, Fabian wrote:

> 2011/11/9 Black, Michael (IS) <michael.bla...@ngc.com>
> 
>> Hmmm...appears to be the same for this case which, I must say, I find
>> surprising.
> 
> Thanks for actually benchmarking it. I'm also a bit surprised, because I
> always thought SQLite handled INTEGER more efficiently than TEXT.

In order to save filespace, SQLite stores integers not as a fixed number of 
bytes per value, but as a different number of bytes depending on the value.  
This would make things slower than being able to read a fixed number of bytes 
from disk and using double-word maths for the values you've read.

> I also did some new benchmarks on the inserts-slowdown I experience, and to
> rule out VirtualBox, I performed them on real hardware, but the results are
> the same:
> 
> 10 secs to create a database with 1 million rows, and 30 secs to add an
> additional 10.000 rows, if the database file is un-cached.
> 
> Maybe this is normal behaviour, but how can it possibly be that it's faster
> to delete the whole database and re-create it, than just adding a
> (relatively) small amount of additional rows?

Didn't someone recently note that entering the first million records was fast, 
but if he then closed and reopened the database, entering the next 100,000 
records was slow ?

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

Reply via email to