Hi,

There are several command-line defragmenters (gui as well) available for windows that are able to defragment certain files or directories only, like:
http://www.defragmentor.com/dmlcl/en/home.asp
http://support.microsoft.com/?kbid=283080
or you may like to create your own routines http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/fs/defragmenting_files.asp

I used such tool (first link above) and was able to defragment live sqlite databases varying from 400kB to 12GB. A large (5GB+) database indeed generally consist of hundreds of fragments if it was slowly build, so it may be worth the effort.

kind regards,

Rene




RohitPatel9999 schreef:
Hi SQLiteUsers

Developing MFC Application (Small Business Accounting Application)
(developed using Visual Studio) - App will run on Windows 98/2000 - App uses SQLite database files for storage of data
- It will have one database for each company accounts/info. So if accounts
of 10 companies, then info will be in 10 different SQLite DB files. - All Database files on same disk.
- User of App may create more company file for accounts of another company.
- User of App may open any existing company file and enter/modify
transactions through different GUI screens.
- User closes file and may open another company file and enter/modify
transactions through different GUI screens.


After using such application, all used SQLite DB files gets fragmented.


How to avoid such fragmentation ?


Is there any feature, to pre-allocate disk-space to SQLite database file so
that initially some free space will be allocated to new file ? Is there any feature, so that when database file gets filled, everytime
automatically increment file size by say 25% or 40% of size ?

FYI: Such pre-allocation of space and automatic incrementing file size is
provided for Database files in SQLServer, Oracle etc.

Rohit
--
View this message in context: 
http://www.nabble.com/Avoiding-Fragmentation-of-SQLite-database-file-----t1780629.html#a4848030
Sent from the SQLite forum at Nabble.com.



Reply via email to