What you are saying makes sense. Thanks for your advice!
However, I do believe there are times when vacuuming would be beneficial. For instance, if a database for software X is detected to have 90% unused space for a couple of weeks, then why bloat the harddrive? (I don't know how to do that though :P) In my opinion, the user should always have the option to vacuum the database. My goal is to let software X have some logic to give the user a hint when this action would be appropriate. > From: slav...@bigfraud.org > Date: Tue, 6 Jul 2010 22:52:11 +0100 > To: sqlite-users@sqlite.org > Subject: Re: [sqlite] How to determine when to VACUUM? > > > On 6 Jul 2010, at 10:45pm, Kristoffer Danielsson wrote: > > > Q: How do I programmatically (through sqlite-APIs?) determine if it's time > > to VACUUM a database? > > It's never time to VACUUM a database. The VACUUM command is useful only if > you have want to recover unused space from the database file. So if your > database file once took up 5 Meg, and you deleted a lot of data from it and > it now takes up only 2 Meg, you could recover 3 Megabytes of disk space. But > how useful is that 3 Megabytes of space to you ? Are you going to use it for > something really valuable ? And how long will it be before you get 3 > Megabytes more data which will fill it up again ? > > If you're trying to get the database in shape to make copies, e.g. to burn it > on a DVD or send it to customers, or put it on a device with limited space, > then there might be some reason to use VACUUM. If not, then it's just a waste > of resources. > > Simon. > _______________________________________________ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users _________________________________________________________________ Messenger i mobilen på 5 sekunder! http://new.windowslivemobile.msn.com/se-SE/Default.aspx _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users