Purpose: You wish to reduce the size of your OpenIZ instance by removing obsolete versions of data from the data store and/or increase performance of the database.
Introduction: OpenIZ's database provides a versioned history of all edits made to concepts, acts, and entities. While this function is useful for tracing the lifetime of an object, it can cause additional data usage on your server. It is a good practice to occasionally check on the database to ensure it is running at peak performance. This help and support article will show you how to use some basic commands to clean up and prune your OpenIZ database.
select relname, last_analyze, last_autovacuum, last_vacuum from pg_stat_all_tables
select pg_size_pretty(pg_database_size(current_database()) / (select count(*) from pat_tbl));
BEGIN TRANSACTION; SELECT squash_db(); COMMIT;
INFO: O O \ / INFO: X X INFO: / \ O O INFO: PRUNING DATABASE STARTED - THIS WILL REMOVE ALL OBSOLETE DATA FROM DATABASE INFO: DEPENDING ON THE SIZE OF YOUR DATASET THIS MAY TAKE UP TO 30 MINUTES INFO: CURRENT DB SIZE: 5433 MB INFO: PRUNING ADDRESSES INFO: PRUNING NAMES