Speed up Trash Duplicate and 301 Redirect Plug-in
-
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 installtionThe page I need help with: [log in to see the link]
- The topic ‘Speed up Trash Duplicate and 301 Redirect Plug-in’ is closed to new replies.