By Chaon on Friday, 16 September 2022
Posted in Technical Issues
Replies 14
Likes 0
Views 593
Votes 0
I'm comming back again with an issue from the past.
My revisions table has grown huge even having revisions off from EB settings it didn't stop the table to grow huge.
At the moment my revisions table is 1 GB and easyblog_post just 392 mb.

Is there any way we can compress or shrink this db?

Regards
Hello Chaon,

Allow me to give you an answer.

The solution would probably be to activate the "Limit Revision History" setting, and adjust the value of "Maximum Revisions To Keep".
And then manually delete old Revisions Posts.

Revisions Settings.png


Have a nice week-end,
Philippe
·
Friday, 16 September 2022 17:30
·
0 Likes
·
0 Votes
·
0 Comments
·
Thank you for the answer but it's been very long time that i have the revisions disabled and the database table still grows. I mean having it disabled isn't it better than adding a limit for my case?

How can i delete revisions manually btw?
·
Friday, 16 September 2022 18:38
·
0 Likes
·
0 Votes
·
0 Comments
·
Chaon,

I find that a limit is better.
In principle if there is already a limit defined (for example 5), the old posts should be deleted automatically.

There may be a problem.
To see what the support will answer (probably Monday now).

Have a nice week end,
Philip
·
Friday, 16 September 2022 18:46
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Chaon,

This is strange. I checked your revisions table and one post in particular(post id=2), has 1063 rows. There are also a number of rows where the created_by is 0. This is incorrect.

Currently there is no way to know how those are generated. The only way to investigate this currently is to clear the revisions table, then monitor it and see whether a large number of rows are generated again for certain posts.

May I have permission to clear the revisions table? Do note that this will also delete all drafts. Since you currently have a number drafts in your drafts listing, you should backup the database first as a precaution. Let us know once you have backed up the database.
·
Monday, 19 September 2022 19:01
·
0 Likes
·
0 Votes
·
0 Comments
·
Dear Raymond,
if i recall correctly i was strongly advised not to delete this table because it can cause malfunctions on easyblog. But it's obvious that that 1 gb table is giving me a headache. If there will be no issues on my easyblog you have my permission to delete it. I already have an automated daily backup from my host.
Regards
·
Monday, 19 September 2022 21:38
·
0 Likes
·
0 Votes
·
0 Comments
·
Alright Chaon.

I have helped you truncate the table and regenerate back the revisions data for each post. The size of the revisions table is now at 768.3MB. This is the smallest size your revisions table can have since each post needs to have at least one revision post.

Can you provide us the access for the 'reporter' user account? You may edit the starting post to include it. I need to access this user to check what is causing extra rows of revision data to be stored.
·
Tuesday, 20 September 2022 15:57
·
0 Likes
·
0 Votes
·
0 Comments
·
Thank you.
Is it safe to add the credentials here? this post is public.
·
Tuesday, 20 September 2022 18:53
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey Chaon,

You may edit the starting post and add it into the Optional Information field of the site details area.

By the way, I managed to identify an issue with scheduled posts where 2 revisions are created when they are published. Will provide you the fix when it is ready.
·
Tuesday, 20 September 2022 18:59
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey Chaon,

You may edit the starting post and add it into the Optional Information field of the site details area.

By the way, I managed to identify an issue with scheduled posts where 2 revisions are created when they are published. Will provide you the fix when it is ready.


I added the credentials as you said.
·
Tuesday, 20 September 2022 19:34
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks Chaon.

I have helped you apply a fix in the following files and helped you clear the extra rows in the revision table. The fix will also be included in the next release.
JoomlaFolder/administrator/components/com_easyblog/includes/post/post.php
JoomlaFolder/administrator/components/com_easyblog/includes/scheduler/scheduler.php


For now you can continue to monitor the revisions table and let us know if there are extra rows.
Remember, as long as each post has one or two revision data then it's correct(attached). For those with two revision data, one should be the original and the other should be the saved draft, which can be deleted from the back-end.
·
Wednesday, 21 September 2022 12:21
·
0 Likes
·
0 Votes
·
0 Comments
·
Thank you for your amazing help.

1. My current drafts on the backend are just 20. Is there a chance that there are more that cannot be found from backend and probably i have to delete them manually from the database?

2. Posts table is type MyISAM and revisions is innoDB.

3. Is it possible to remove revisions when a post is sended to archive? Maybe this can also reduce the size.

Regards
·
Thursday, 22 September 2022 15:12
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey Chaon,
1. My current drafts on the backend are just 20. Is there a chance that there are more that cannot be found from backend and probably i have to delete them manually from the database?
I have already cleared the revisions table which means they shouldn't be any extra drafts that are not visible on the back-end.
Is it possible to remove revisions when a post is sended to archive? Maybe this can also reduce the size.
A minimum of one revision is still required. So if the archived post currently has 1 revision, then you cannot remove it.
·
Thursday, 22 September 2022 16:34
·
0 Likes
·
0 Votes
·
0 Comments
·
So it's normal behaviour the revisions table to have double size compared to post table?
·
Thursday, 22 September 2022 17:13
·
0 Likes
·
0 Votes
·
0 Comments
·
Yes that is correct. Revision table stores raw data that is larger than the data stored in post table.
·
Thursday, 22 September 2022 17:18
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post