Page 1 of 3

Purging phpbb_topics_tracks table?

Posted: Sun Oct 17, 2010 3:41 pm
by digioz
Hello phpBB Team!

I have a forum installation that has a database 2 GB large, and I have noticed that the majority of the size of the database come from phpbb_topics_track table. My understanding is that this table is used to track what threads are read. Would it be ok to purge records older than one year to free up some space? I don't think anyone would care to know if they have read topics that old.

Thanks
Pete

Re: Purging phpbb_topics_tracks table?

Posted: Sun Oct 17, 2010 6:47 pm
by digioz
Anyone? This is not a very hard question to answer. I just want to make sure nothing else is referencing the records.

Re: Purging phpbb_topics_tracks table?

Posted: Sun Oct 17, 2010 6:49 pm
by Pit$Bull
http://www.phpbb.com/rules/#rule4g
Bumping a topic (replying directly after your own post) is only permitted after six hours have elapsed. Priority is generally assigned to topics in chronological order, so excessive bumping will result in longer wait times.

Re: Purging phpbb_topics_tracks table?

Posted: Sun Oct 17, 2010 9:04 pm
by digioz
Sorry, I wasn't aware of this rule. The thread you pointed to however doesn't have anything to do with my problem. Can you explain what you mean by it?

Re: Purging phpbb_topics_tracks table?

Posted: Sun Oct 17, 2010 9:08 pm
by Pit$Bull
Sorry, I posted the incorrect link. Link has been edited.

Please fill out the Support Request Template Generator and post it back here to enable us to assist you better.

Re: Purging phpbb_topics_tracks table?

Posted: Sun Oct 17, 2010 9:39 pm
by digioz
Support Request Template
What version of phpBB are you using? phpBB 3.0.6
What is your board's URL? http://n/a
Who do you host your board with? The planet
How did you install your board? I used the download package from phpBB.com
Is your board a fresh install or a conversion? Fresh Install
Do you have any MODs installed? Yes
Is registration required to reproduce this issue? No
What MODs do you have installed? Not important for the question I am asking
What styles do you currently have installed? Prosilver2
What language(s) is your board currently using? English
Which database type/version are you using? MySQL 5
What is your level of experience? New to PHP and phpBB
When did your problem begin? I am not having any problem with it. Just trying to free up some space.
Please describe your problem. I have a phpBB installation that is 2GB large, 1.6 of those are in phpbb_topics_tracks (44 million records). I am just trying to find out if it is ok to purge any of those records.
Generated by SRT Generator ($Rev: 4502 $)

Re: Purging phpbb_topics_tracks table?

Posted: Sun Oct 17, 2010 9:44 pm
by Pit$Bull
I ask for the SRT in hopes you would provide the MOD's you have installed as this could be a factor.

Re: Purging phpbb_topics_tracks table?

Posted: Mon Oct 18, 2010 12:05 am
by digioz
Please assume this is a standard install with no Mods installed, although I don't understand how a simple question such as this would require all day and several back and forth posts when my question is a simple yes or no question. It is a waste of my time as well as your, not to mention the board in question is in limbo this whole time because it is running out of allocated storage space. I am not even sure if there are any mods in existence that deal with read posts, which makes this even more baffling for me!

I realize you guys do this to allocate support time better, but in cases such as this it makes absolutely no sense.

Re: Purging phpbb_topics_tracks table?

Posted: Mon Oct 18, 2010 12:11 am
by Pit$Bull
I could have maybe solved your issue with more information but since you insist I will state I don't have an answer for you.
http://www.phpbb.com/rules/#rule4h
Please remember that phpBB is Open Source Software, provided and supported by a team of volunteers. All members of the staff and community are assisting you during their spare time with only your gratitude as compensation. We ask that you consider this before posting.

Re: Purging phpbb_topics_tracks table?

Posted: Mon Oct 18, 2010 12:20 am
by 3Di
digioz wrote: I realize you guys do this to allocate support time better, but in cases such as this it makes absolutely no sense.
it makes sense if you think you are not the only one seeking for support here, being harsh with those are trying to help you out just asking for a simple information you was not able to give to, makes a no sense to me.. instead. just my 2 €cents.

also, asking for detailed further informations (that should be given at first) it is a PRO way to answer as fast as possible with a right answer, without rounding in circles.

regards.

Re: Purging phpbb_topics_tracks table?

Posted: Mon Oct 18, 2010 1:09 am
by digioz
Ok, I give up. I will just have to go through the code myself and find out. A lot has changed since phpBB first came out, and certainly not for the better.

Re: Purging phpbb_topics_tracks table?

Posted: Mon Oct 18, 2010 7:51 am
by Noxwizard
How it affects people is going to vary. There are three pieces of tracking information for each user: forum mark time, topic mark time, and user last mark track (mark all). If there is no topic mark time, it falls back to the forum mark time, if there's no forum mark time, it falls back to the last time that the user hit "Mark all forums read."

When a topic is read, an entry is placed into the topic track table. When a forum is marked as read, an entry is placed into the forum track table, and all topics in that forum are removed from the topic track table. When "mark all forums read" is clicked, all entries for that user are removed from the forum and topic track tables, and the user_lastmark entry in the user table is updated.

If the topic track table is filling up, then your users aren't making use of the "mark forum/all read" options. If you delete those entries, they'll show up as unread. What you would probably want to do is delete all entries after some time X and then update all users lastmarks to that time if their mark is older than that. You could do the same thing for the forum track table too.

Re: Purging phpbb_topics_tracks table?

Posted: Mon Oct 18, 2010 11:47 am
by digioz
Thank you very much for that explanation Nox. Much appreciated.

Re: Purging phpbb_topics_tracks table?

Posted: Sun Aug 07, 2011 4:29 pm
by digioz
Is there a feature or Mod that allows Forum Administrators to "mark all forums read" for all forum users from Admin CP or any other part of the Forum?

Re: Purging phpbb_topics_tracks table?

Posted: Sun Aug 07, 2011 5:16 pm
by Noxwizard
There is no such feature, nor do I see a MOD that offers that capability.