Advertisement:

Author Topic: smf_log_topics table HUGE (can't upgrade!)  (Read 89311 times)

Offline HunterP

  • Sr. Member
  • ****
  • Posts: 976
  • Gender: Male
  • SMF 2.0.4
    • Hulpverleningsforum Nederland
Re: smf_log_topics table HUGE (can't upgrade!)
« Reply #60 on: January 29, 2013, 12:54:09 PM »

Hi there,

What is the advantage of marking the topics/boards read above removing all entries for inactive members?

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 70,939
    • StoryBB/StoryBB on GitHub
Re: smf_log_topics table HUGE (can't upgrade!)
« Reply #61 on: January 29, 2013, 12:58:17 PM »
Well... marking a topic read adds one row to the log_topics table.

Marking a board read means you can remove all the rows for all the topics in that board and replace it with a single row in the boards read table.

Pruning inactive members' rows means you prune the rows for all of them, the advantage of which is that the table is smaller. Smaller tables are nearly always faster in every respect, not least when querying and joining.
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline HunterP

  • Sr. Member
  • ****
  • Posts: 976
  • Gender: Male
  • SMF 2.0.4
    • Hulpverleningsforum Nederland
Re: smf_log_topics table HUGE (can't upgrade!)
« Reply #62 on: January 29, 2013, 01:46:44 PM »

Thanks Pete,

So there is no harm in pruning inactive members rows in these three columns?
Other than these members getting all messages unread *if* they ever arise from the dead :)

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 70,939
    • StoryBB/StoryBB on GitHub
Re: smf_log_topics table HUGE (can't upgrade!)
« Reply #63 on: January 29, 2013, 01:47:33 PM »
If they are suitably inactive, it does no harm to prune the rows - all it just means is that there is now more unread content for them if they do return.
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline LaurieC

  • Jr. Member
  • **
  • Posts: 139
  • Gender: Female
  • I've been Hooked!
Re: smf_log_topics table HUGE (can't upgrade!)
« Reply #64 on: February 17, 2013, 12:28:11 PM »
Has anyone tried this with their 2.0.4 yet?
LaurieC

Offline whoey

  • Semi-Newbie
  • *
  • Posts: 69
  • Gender: Male
Re: smf_log_topics table HUGE (can't upgrade!)
« Reply #65 on: April 23, 2013, 06:57:07 PM »
doesn't seem to work for me anymore :(

I'm trying to migrate from punbb to SMF 2.0.4

It worked during the trial run, but I think that was before we patched from 2.0.3

Offline eliasr1990

  • Newbie
  • *
  • Posts: 1
Re: smf_log_topics table HUGE (can't upgrade!)
« Reply #66 on: August 01, 2013, 04:07:56 PM »
it works for me @ 2.0.4

Offline postpar

  • Semi-Newbie
  • *
  • Posts: 35
Re: smf_log_topics table HUGE (can't upgrade!)
« Reply #67 on: May 06, 2019, 11:42:11 AM »
I just want to add a data point and say I ran this, and it worked beautifully — cut 5 mb out of the 6.5 MB table. It had never been run over something like ten years.

I was a bit confused because it would not run from the command line; but it ran fine from the web.  I did have to change one line near the top to tell it what directory to use.

I've stripped permissions from it for safety, but it ran very nicely, very quickly, and very predictably! Thank you!

Using SMF 2.0.15 (since the last note was that it worked on 2.0.4, I thought it worth reopening the thread.)