On 5 Apr 2011, at 3:05pm, Technology Lighthouse wrote: > My application makes use of a number of separate SQLite DB files (in > some cases > 100). Each DB is handled by its own thread, which may be > making frequent small writes, or sleeping extensively then occasionally > making a more substantial number of writes. I'm trying to decide on a > policy for keeping DBs open versus repeatedly opening/closing them. > > Are there any hard or practical limits on the number of SQLite DBs that > can be held open at the same time? And is there any data on the relative > performance cost of the open operation?
As Stephan remarks this is more to do with the operating system than SQLite. In fact I think all your questions are tightly bound to characteristics of your operating system, several of them giving completely different answers even between different versions of Windows. Windows 7, for instance, is slower at opening files than Windows XP, but does more caching once a file is open. Unix, on the other hand, does caching on the first read rather than when the file is initially opened. So I suspect you should run some experiments with your own particular setup: the OS your customers will use, the amount of memory they'll have in their computers, and the access speeds their hard disks will have. The natural question is whether all these really need to be in separate files. Do all these databases have the same schemas (same tables with the same columns) ? Simon. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users