thanks

I'm not sure of the real reason.
It's true that the speed of inserting with transaction is very fast. But my
project is using SQLite mainly in selecting something. I don't know how to
use transaction in the situation. May some friends give me some codes on
that?

My application needs some funcs that serve as the database API, so I must
encapsulate SQLite func in my func. It includes the basic routine like this:
1.) sqlite3_open();
2.) sqlite3_get_table(),  sqlite3_exec()+callback, 
sqlite3_prepare_v2()+sqlite3_step()+sqlite3_column*+sqlite3_finalize()
3.) sqlite3_close();

I found that every routine running in the object board (Atmel 9260 (200MHz)
+ 128M RAM + ...) spend 20 millisecond. It's too slow...

And I have tried some PRAGMA settings for example: cache_size/page_size, but
the effect is very few.



John Stanton-3 wrote:
> 
> P Kishor wrote:
>> On Fri, Apr 24, 2009 at 5:27 AM, John Stanton <jo...@viacognis.com>
>> wrote:
>>   
>>> Sqlte provides COMMIT and ROLLBACK unlike Berkeley.  If you can get by
>>> without the advanced features of Sqlite, then use Berkely and take
>>> advantage of its simplicity and faster execution.
>>>     
>>
>> BDB does support transactions...
>>
>> http://www.oracle.com/technology/documentation/berkeley-db/xml/gsg_xml_txn/cxx/usingtxns.html
>>
>> In fact, BDB acts as the (a) transactional layer in MySQL (the
>> alternative is InnoDB).
>>
>> Of course, other advantages of SQLite still apply. A key-value
>> metaphor can only be pushed so far.
>>
>>   
> Guess what make BDB run faster - no transactions. If you are not using
> transactions BDB mght be for you. Personally as a long time user of BDB
> in various ways I have a very poor opinion of it. It has a very
> different application to Sqlite.
> 
> 
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
> 
> 

-- 
View this message in context: 
http://www.nabble.com/speed-test%2C-Sqlite3-vs-BerkeleyDB%2C-I%27m-confused-tp23209208p23269006.html
Sent from the SQLite mailing list archive at Nabble.com.

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

Reply via email to