On Aug 3, 2009, at 2:06 PM, Kosenko Max wrote:

>
>
> Dan Kennedy-4 wrote:
>> McObject CEO Steve Graves points out that because of limits of the  
>> API
>> they were using, SQLite performs each INSERT and DELETE in the test  
>> in a
>> separate transaction. So the reported times for these tests may be  
>> more of
>> a measure of the speed of the media than SQLite itself.
>>
>> The body of the report shows that SQLite scans (iterates through)  
>> rows
>> more quickly than Perst does (about 1.5 times faster). But Perst  
>> can look
>> up individual objects more quickly (about 6 times faster). The  
>> comments
>> in the report indicate that SQLite was not using pre-compiled SQL or
>> read-only transactions for the object-lookup test, so that gap could
>> probably be closed some by better use of the SQLite API. Perhaps more
>> importantly though,  Perst is an Object DB, so it is caching the  
>> actual
>> objects in-memory, whereas SQLite is only caching database pages. I
>> haven't much experience with them, but I think Object DBs are usually
>> faster for this kind of task. YMMV.
>
> While this is offtopic, I just want to comment that there could be a
> problems with any tests around, so you can propose changes to test  
> code if
> you feel it could be done better.

I have no issue with the content of the report or formulation of the  
tests.
I think the folks at McObject have done a good job of testing the two  
systems
and shown real integrity by explaining the results. Most commercial  
operations
are much less forthcoming.

> Read-only transaction and skipping single preparation wouldn't speed- 
> up
> SQLite in that test.

Earlier I just quoted the conclusions of the McObject report. Maybe I
misunderstood. But now that I have read the benchmark code, I'm curious.

Why is the SQL not being recompiled for each query? Is there some kind  
of
compiled query cache hiding behind the  [db.query()] call in Android?

Why would it not help to use a read-only transaction? Is SQLite using
exclusive-locking mode? In the tests I've been working on today I've
found that read-only transactions speed up SQLite considerably for this
kind of workload, even when using exclusive-locking mode.

Are you by any chance the author of the report I'm reading?

Dan.


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

Reply via email to