compress database option question

Technical support and discussion of Newsbin Version 6 series.

compress database option question

Postby Bexley » Wed Oct 14, 2015 11:06 am

Hi, great product! I would like to know what the exact mechanism for compressing database is, does it compress in place, or does it make a complete copy, and is there a way to specify what temp directory it uses if it does make a copy? Also does compress have to occur in the foreground, so that the compress takes over the instance? I regrettably let a newsgroup grow very large and wonder what my options are...
Bexley
Occasional Contributor
Occasional Contributor
 
Posts: 35
Joined: Tue Nov 22, 2011 8:30 pm

Registered Newsbin User since: 05/01/09

Re: compress database option question

Postby Quade » Wed Oct 14, 2015 12:52 pm

The storage files are database files. Deletes don't actually delete, they just free up space that other headers can use. At some point the size of the group will steady state as old records are purged and new records are added.

If you want to make the file smaller, you'll need to reduce the "Storage Age", update the group (to force it to delete records older than "storage age") then do the "Compact Group". It does something called a "vacuum" which essentially makes a copy of the DB then then re-writes the db from the copy. "Vacuum" will improve performance too.

You can do it from the display or you can go into the group folder itself using a dos prompt and manually vacuum using the "Sqlite3.exe" tool which is installed into the Newsbin install folder.

http://www.sqlite.org/

Tools to manipulate the DB files can be found here. If you do it manually, you'll want to vacuum both "Storage" and "StorageData" db3 files. You could even copy the DB3's to a different machine, compact them, then copy them back if space is tight.
User avatar
Quade
Eternal n00b
Eternal n00b
 
Posts: 44950
Joined: Sat May 19, 2001 12:41 am
Location: Virginia, US

Registered Newsbin User since: 10/24/97

Re: compress database option question

Postby Bexley » Mon Oct 19, 2015 7:42 pm

Excellent very complete reply, thank you :D
Bexley
Occasional Contributor
Occasional Contributor
 
Posts: 35
Joined: Tue Nov 22, 2011 8:30 pm

Registered Newsbin User since: 05/01/09


Return to V6 Technical Support

Who is online

Users browsing this forum: Google [Bot] and 2 guests