On 10.05.2011, at 12:06, Stephan Beal wrote:

> On Tue, May 10, 2011 at 11:52 AM, Enrico Thierbach <e...@open-lab.org> wrote:
> 
>> I don't think sqlite (or any SQL database, for that matter) is a perfect
>> fit for a logger, because there is a certain amount of write overhead.
>> Why do you think you would want to do this?
>> 
> 
> ALL db insertions in a db are, in effect, some form of logging. In embedded
> apps with no stdout/stderr (e.g. WinCE) using sqlite as a logging
> destination can be quite useful (and easy to set up).

Yes and no: logging is an (append-only) write to an already opened file or 
network socket, and no indexes need to be updated. While inserting a document 
into a database needs to fiddle with internal database structures, which is 
less performant than just writing a few bytes to an already handle.

Of course, constraints on an embedded device are different than, say, on a Unix 
server, and logging to a database is easy to set up, especially if the database 
is already there :). In other scenarios file system logging generally wins, and 
not only performance wise, but because there are plenty of tools to work with 
those; unless, of course, there is a specific need to use a database.

/eno


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

Reply via email to