On Mon, Feb 23, 2009 at 12:57 PM, Christoph Schreiber <luky0...@yahoo.de> wrote:
> hi!
> how expensive is sqlite3_open? i'm working on a small 
> (one-thread-per-connection) server. is it smart (in terms of cpu-time and 
> memory usage) to use sqlite3_open for every connection or is it better to 
> create a pool of pre-opened sqlite-connections?

SQLite needs to parse the database schema every time you open the
database, which can take some time if your schema is big (many tables
in single database).

Usually this is fast enough, but if you have no control on the schema
of the databases you will be opening maybe a safe bet is to cache
connection handlers.

Regards,
~Nuno Lucas

> regards, luky
>
> ps: sqlite3_enable_shared_cache is turned on.
>
>
>
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to