> I can approximately calculate, how big the new database will grow. Is > there a way to tell SQLite to reserve an inital space or numer of pages > instead of letting the database file grow again and again? >
Thought about this recently. Another idea is to tweak VFS. Since xWrite method is supposed to accept iOfst that is bigger than the current file size, one can check whether the new write query is going to allocate new space for the file (vs internal space writing), and before actual call make prior call of the same function writing for example a single zero byte a little far and after that perform the original request. The only thing that can be affected in this case is the routines that use xFileSize. I looked at the sources, at least backup Api uses it, it either should be straightforward in this case or "pretend" and report the expected file size. >From what I see, it seems that the sqlite internally doesn't rely on the file size for the core functionality and xFileSize looks more like a service function, but I may be wrong Max Vlasov, www.maxerist.net _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users