Reducing the size of the DB, especially the phorum_files table
Posted by Mark Fresh
Reducing the size of the DB, especially the phorum_files table January 20, 2011 06:29AM |
Registered: 18 years ago Posts: 85 |
Hi
I'm running 5.1.25 and I want to upgrade to the latest version 5.2.16, the problem is that my database is so big that I can't run it in my test environment to make sure the upgrade will work properly. So these are the largest tables on my live site,
phorum_files 13,076 rows - 2.4GB
phorum_message 515,505 rows - 366MB
phorum_pm_messages 270,730 rows - 460MB
phorum_search 515,504 rows - 345MB
phorum_user_newflag 9,708,793 rows - 517MB
Is there any way I can reduce them so the db is small enough to fit onto my test environment (about 1GB). I have purged the stale files already. I did try deleting some old messages but I have a feeling they may have left any associated files in the DB.
Thanks in advance
Mark
I'm running 5.1.25 and I want to upgrade to the latest version 5.2.16, the problem is that my database is so big that I can't run it in my test environment to make sure the upgrade will work properly. So these are the largest tables on my live site,
phorum_files 13,076 rows - 2.4GB
phorum_message 515,505 rows - 366MB
phorum_pm_messages 270,730 rows - 460MB
phorum_search 515,504 rows - 345MB
phorum_user_newflag 9,708,793 rows - 517MB
Is there any way I can reduce them so the db is small enough to fit onto my test environment (about 1GB). I have purged the stale files already. I did try deleting some old messages but I have a feeling they may have left any associated files in the DB.
Thanks in advance
Mark
January 20, 2011 06:41AM |
Admin Registered: 20 years ago Posts: 8,532 |
After deleting messages, purging stale files will cleanup the remaining orphan files. Note that your tables might be smaller when exporting them. You could also try to optimize the tables to check this in advance (I am not sure if this is fully true for MySQL, but I know the effect from various other db systems.)
For testing, you can of course opt for not exporting the files at all. That will give you some broken attachments when reading messages, but nothing else. Testing the attachments can be done by posting some new messages on the test system. That's how I do it too.
Maurice Makaay
Phorum Development Team
my blog
linkedin profile
secret sauce
For testing, you can of course opt for not exporting the files at all. That will give you some broken attachments when reading messages, but nothing else. Testing the attachments can be done by posting some new messages on the test system. That's how I do it too.
Maurice Makaay
Phorum Development Team



Sorry, only registered users may post in this forum.