2020年12月6日 星期日

Why seg0 is so big? MirthConnect , derby -> PostgreSQL + Mirth

Because : 

https://forums.mirthproject.io/forum/mirth-connect/support/12368-why-seg0-is-so-big


he seg0 is too big!One of the files(*.dat) in it is about 90+G suddenly one day
.The mirth is running in the computer in a hospital.I am a beginner in Mirth.Please help me!
The files(*.bat) are in "D:\Mirth Connect\appdata\mirthdb\seg0".

Pruning can certainly help reduce the size of your database, yes. Make sure to actually enable pruning on the Data Pruner settings view (Message Pruner in 2.x). However, pruning does not shrink the database disk size. For that you will still need to vacuum. If you were using PostgreSQL, then TRUNCATE statements should auto-shrink database sizes (which is what happens when you Delete All Messages for a channel).


Solution : 

Install : https://consultzen.com/webinars-replacing_the_database/


Setting : 

 https://stackoverflow.com/questions/28573486/mirth-connect-is-it-safe-to-drop-the-old-messages-table-after-upgrading-to-ver


The same thing happened to me after upgrading from Mirth Connect 2 to 3. The old_message table took a lot of disk space and I didn't need the messages anymore. I truncated the old_message table and it did not have any adverse effects in Mirth Connect.

We are using Postgres instead of MySQL, but the truncate syntax is the same.

# ./psql mirthdb postgres
psql (9.0.13)
Type "help" for help.

mirthdb=# TRUNCATE TABLE old_message;
TRUNCATE TABLE
mirthdb=#