WordPress.org

Ready to get started?Download WordPress

Forums

WP Changes Tracker
[resolved] too many DB results and bloated table... (4 posts)

  1. Israel Curtis
    Member
    Posted 1 year ago #

    Was trying to figure out why I could visit any page in wp-admin except the dashboard (timed out and 500 error), finally found that on my site, the problem with this plugin is the sheer number of database results it is grabbing by default: 136,146! That is simply too much data to go and retrieve all at once, especially considering how large some of the individual rows are.

    I have added 2 lines to the wp_changes_tracker::display_log() method. I changed these lines...

    if($this->options['max_log_entries_to_display']>0){
    $sql .= ' LIMIT '.$this->options['max_log_entries_to_display'];
    }

    ... to this instead...

    if($this->options['max_log_entries_to_display']>0){
    $sql .= ' LIMIT '.$this->options['max_log_entries_to_display'];
    } else {
    $sql .= ' LIMIT 10';
    }

    This forces the default to only display the last 10 entries, instead of displaying all 136,146 entries.

    There is absolutely no reason to default to grabbing so many rows of data all at one time. Also, the table for WP-tracker had grown to 300MB, in a DB that would otherwise be only 6MB.

    http://wordpress.org/extend/plugins/wp-changes-tracker/

  2. pixeline
    Member
    Plugin Author

    Posted 1 year ago #

    Sorry for not seeing this post before. Will update the plugin asap. thanks and sorry about that.

  3. pixeline
    Member
    Plugin Author

    Posted 1 year ago #

    I reviewed the code (been a long time). On setup, that option should have been defaulted to 300. Not sure why, i'll look after that.
    In any case, you can set it as an option in the Settings > WP Changes tracker screen, no need to hack the code.

  4. pixeline
    Member
    Plugin Author

    Posted 1 year ago #

    Just updated the plugin: I fixed the options not being correctly defaulted and I added an option that needs to be set to "true" if you want to keep the previous value of any wordpress option changed. Will help keep the log size down.

    I'll work on adding a "trim the log table from the Settings page" feature soon.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.