Support » Plugin: Trash Duplicate and 301 Redirect » Speed up Trash Duplicate and 301 Redirect Plug-in

  • Resolved tekrat

    (@tekrat)


    Hey all,

    If you are having speed issue with the speed of the Trash Duplicate and 301 Redirect Plug-in I wanted to post my solution. This will also help with the general speed of searches. I hope this helps someone or at least spurs some conversation.

    I created the indexes below and my performance went from from 5-10 minute runs to about 30-60 second runs. Here are the indexes:

    — The plug-in heavily relies on the title of posts for it’s searches.
    ALTER TABLE smfh_posts ADD INDEX idx_smfh_posts_title (post_title(250) )

    — * ID is a common sort value. Since this is already an indexed value you could not use
    — it. I’ll let DBA discuss this one
    — * post_status – the plug-in excludes items in the trash so the status helps the
    — overall exclusion
    — * post_date – One of the option is to keep oldest or newest. This will help to
    — decide which to keep.
    ALTER TABLE smfh_posts ADD INDEX idx_smfh_posts
    (ID, post_status, post_date)

    Some last notes:
    * ‘smfh_’ was my hosting services default prefix. For most people it will just be ‘wp_’.
    * There is a cost for speed: storage space. You are sorta making mini databases in your database. Most hosting services are capped at 200 megs.
    * Back up your database if you can. You are touching you’re primary table in your WordPress installtion

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor khushbu padalia

    (@khushbupadalia)

    Hi @tekrat,

    Thank you for posting your valuable solutions. It will help to others.

    Regards,
    Khushbu

    Hi @tekrat or contributers,

    It is helpful to post how the solutions works to create indexes. I also have performance issues after using the plug-in. I do not know how to do the solution you did.

    Plugin Contributor khushbu padalia

    (@khushbupadalia)

    Hi @dartfreakz,

    You need to run below query in your database. Make sure to take backup of database before doing this. Also in below query wp_ is database prefix. You can change it with your database prefix.

    ALTER TABLE wp_posts ADD INDEX idx_wp_posts
    (ID, post_status, post_date)

    Thank you and regards,
    Solwin Infotech

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Speed up Trash Duplicate and 301 Redirect Plug-in’ is closed to new replies.