Title: Performance thoughts?
Last modified: December 21, 2025

---

# Performance thoughts?

 *  Resolved [jondaley](https://wordpress.org/support/users/jondaley/)
 * (@jondaley)
 * [4 months, 3 weeks ago](https://wordpress.org/support/topic/performance-thoughts/)
 * I just upgraded wordpress to the latest version, which involved adding a key 
   to the posts table. This query had a table-level meta lock, and took 15 minutes
   to complete, so that hung the site for visitors as it parsed through everything(
   and perhaps some bad queries – I never understand why plugins have so many database
   writes when a non-logged-in visitor is simply viewing the site…)
   Anyway, I’ve
   been looking to reduce the size of the posts table and am erasing all of the 
   revisions of the posts – this site is a large site and has been around for a 
   couple decades, so has built up a lot of posts and revisions. Hopefully that 
   will make a big difference, but in the process, I noticed the database structure
   of your plugin, and wonder if it would be better to have your own table, rather
   than having the (basically 28,000 empty) rows in posts and then roughly 3*28,000
   entries in postmeta).It seems to me (on a 15 second glance at your plugin), that
   you could use far less data, and then not have any performance impact on all 
   of the queries that access the post and postmeta table, but creating your own
   table:related_posts (id, parent_post, child_post)or something like that? I think
   I could probably write a db hook/filter that traps your database reads and writes
   and redirects them to a table that I create myself, but if you would make the
   change on your end, then all of the users would get the performance impact, and
   I don’t have to worry about needing changes if/when you update the plugin.

You must be [logged in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fperformance-thoughts%2F%3Foutput_format%3Dmd&locale=en_US)
to reply to this topic.

 * ![](https://ps.w.org/related-posts-for-wp/assets/icon-256x256.png?rev=970117)
 * [Related Posts for WordPress](https://wordpress.org/plugins/related-posts-for-wp/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/related-posts-for-wp/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/related-posts-for-wp/)
 * [Active Topics](https://wordpress.org/support/plugin/related-posts-for-wp/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/related-posts-for-wp/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/related-posts-for-wp/reviews/)

## Tags

 * [performance](https://wordpress.org/support/topic-tag/performance/)

 * 0 replies
 * 1 participant
 * Last reply from: [jondaley](https://wordpress.org/support/users/jondaley/)
 * Last activity: [4 months, 3 weeks ago](https://wordpress.org/support/topic/performance-thoughts/)
 * Status: resolved