Then, do you know a way to optimize my usage ?

I suppose you have a pattern to which database are accessed at any point in time?

If so rather than opening and closing databases directly, you could pool them, so that if an operation is needed on a recently opened database, it will still be opened, which would eliminate the open/close overhead.

You should be able to implement the above by redirecting your database open/close functions to two simple functions + array + critical section to protect the array if you're multi-threaded.

There are many complicated strategies for pooling, but a simple "empty the pool when it's full" could be good enough to tell you if it's an option that is beneficial to I/O in your case. If it is, you can always refine the pooling strategies.

Eric

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

Reply via email to