WordPress.org

Forums

podPress
Upgrade of the data base table: wp_podpress_stats with large table (5 posts)

  1. mvandemar
    Member
    Posted 2 years ago #

    My client's host, Bluehost, forced some WordPress upgrades on them last week, and one of the upgrades was to podpress. We got the "The podpress upgrade is not complete" message, and a popup informing us of what needed to be done, ie. correction of some of the data. However, this isn't going to work as currently set up:

    In this case the max. execution time for the blog software is: 30 seconds.
    The time needed to correct 10 rows in the data base: 6.21019411087 seconds
    Select an increment: 10 <= 36 (The increment should be smaller than this value)
    Number of rows in the data base table wp_y4xojb_podpress_stats: 370359
    Number of rows which need be processed: 370349

    This means that it would take 36 hours to run this update, and from the looks of it, it has to be manually initiated with each increment.

    There have to be a way of updating this data directly with a mysql query. If the developer can supply the logic behind what is happening with each iteration of the updates I would be more than happy to help come up with the necessary query.

    Thanks.

    http://wordpress.org/extend/plugins/podpress/

  2. ntm
    Member
    Plugin Author

    Posted 1 year ago #

    You are correct. It is necessary to initiate the upgrade over and over. The reason why I choose to implement this type of procedure is because a lot of hosting providers limit the max_execution_time of PHP scripts. If a _podpress_stats db table has a lot of entries, the upgrade would take to much time in a lot of case and the script would simply be stuck without any explanation. The current script controls after upgrading a db table row the elapsed time and stops the script before it would hit the time limit.

    I have posted the mysql command the script uses here: http://wordpress.org/support/topic/alternative-for-updating-wp_podpress_stats

    I would welcome any thought which would help to improve the process.

  3. mvandemar
    Member
    Posted 1 year ago #

    You can absolutely speed that up, simply by adding a where clause:

    SELECT count(*) from wp_podpress_stats where media like '% %' or media like '%!%' or media like '%(%' or media like '%)%' or media like '%;%' or media like '%@%' or media like '%&%' or media like '%=%' or media like '%$%' or media like '%,%' or media like '%[%' or media like '%]%';

    You would need to verify that against a table that actually has those entries to be sure, but I am fairly certain that is what you need, and it only took 1.25 seconds to determine that my client did not have any records that needed upating. There is no reason to run the update against the entire table unless you know for certain all of the records are going to be affected.

  4. ntm
    Member
    Plugin Author

    Posted 1 year ago #

    Sounds like a good idea. I will take a close look at the weekend.

    Thanks,
    Tim

  5. ntm
    Member
    Plugin Author

    Posted 1 year ago #

    I will use this for the plugin. It will be in the next upgrade. But it is possible that I need two more weeks to release that upgrade.

    Thank you for your help!!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic