Title: Slow query performance!!
Last modified: August 22, 2024

---

# Slow query performance!!

 *  [Vimal Roy](https://wordpress.org/support/users/vimalroy08/)
 * (@vimalroy08)
 * [1 year, 9 months ago](https://wordpress.org/support/topic/slow-query-performance/)
 * Hello,
 * We have a multilingual WordPress website using WPML with over 52,000 posts across
   8+ languages. We are encountering performance issues and site slowness, which
   seem to be related to the size of several database tables.
 * Here is an overview of the large database tables:
    - `wp_icl_translate`: 1859.59 MB
    - `wp_icl_translation_status`: 1196.06 MB
    - `wp_postmeta`: 1095.48 MB
    - `wp_posts`: 570.16 MB
    - `wp_icl_string_translations`: 260.89 MB
 * To address these issues, we have optimized the database using the WP Rocket plugin,
   clearing out unnecessary data like post revisions, transients, and auto drafts.
   Additionally, we have set `WP_POST_REVISIONS` to 3.
 * I came across the suggestion to split large tables into multiple tables as a 
   potential optimization. Could anyone share their experience with this approach?
 * Moreover, I would appreciate any recommendations on further improving site performance,
   especially with regard to the database, queries, and overall request handling.
 * Thank you in advance for your assistance.
 * Best regards,
   Vimal Roy
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fslow-query-performance%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [Anton Vlasenko](https://wordpress.org/support/users/antonvlasenko/)
 * (@antonvlasenko)
 * [1 year, 9 months ago](https://wordpress.org/support/topic/slow-query-performance/#post-17969877)
 * > I came across the suggestion to split large tables into multiple tables as 
   > a potential optimization. Could anyone share their experience with this approach?
 * I wouldn’t split tables, as I don’t think WordPress is quite optimized for that
   scenario. This approach is complex and can introduce significant risks and maintenance
   challenges. Instead, I would consider archiving some of the old data that’s no
   longer needed, such as old posts.
 * > Moreover, I would appreciate any recommendations on further improving site 
   > performance, especially with regard to the database, queries, and overall request
   > handling.
 * I risk sounding obvious, but I would ensure that commonly queried table rows 
   have indexes and that these indexes are actually being used in database queries.
   A balanced approach is needed here, as adding too many indexes could slow down
   inserts and updates.
 * I would also look into caching the most frequently used data.
 *  Thread Starter [Vimal Roy](https://wordpress.org/support/users/vimalroy08/)
 * (@vimalroy08)
 * [1 year, 9 months ago](https://wordpress.org/support/topic/slow-query-performance/#post-17971976)
 * Hi [@antonvlasenko](https://wordpress.org/support/users/antonvlasenko/) ,
 * Thank you for your response and for sharing your insights.
 * Regarding the suggestion to remove old articles, I understand the rationale behind
   it, but as a news agency, retaining old articles is crucial for our SEO strategy.
   These articles are already indexed by search engines and have accumulated backlinks,
   which significantly contribute to our traffic. Removing them could result in 
   broken URLs, a loss of traffic, and a negative impact on our SEO and rankings.
   However, we will consider archiving or removing articles that do not have any
   backlinks or do not contribute to our SEO strategy. Your advice on this is greatly
   appreciated.
 * Regarding the indexing of database tables, I came across a plugin called [Index WP MySQL For Speed](https://wordpress.org/plugins/index-wp-mysql-for-speed/)
   that specifically aims to optimize MySQL indexes for WordPress. I wanted to confirm
   if this is the type of indexing you were referring to. If not, could you please
   provide more details on the indexing approach you mentioned?
 * We are already utilizing WP Rocket for caching and preloading, and we have Redis
   Object Cache enabled on our server to cache database queries. Despite these optimizations,
   we are still experiencing performance issues, so any further recommendations 
   you might have, particularly in terms of database optimization, would be greatly
   appreciated.
 * Thank you once again for your time and assistance.
 * Best regards,
   Vimal Roy
    -  This reply was modified 1 year, 9 months ago by [Vimal Roy](https://wordpress.org/support/users/vimalroy08/).
 *  [Anton Vlasenko](https://wordpress.org/support/users/antonvlasenko/)
 * (@antonvlasenko)
 * [1 year, 9 months ago](https://wordpress.org/support/topic/slow-query-performance/#post-17972322)
 * > but as a news agency, retaining old articles is crucial for our SEO strategy.
 * I agree. Thanks for explaining.
 * > I wanted to confirm if this is the type of indexing you were referring to.
 * Yes, I can confirm that this is the type of indexing I was referring to.
 * While I haven’t personally used that specific [plugin](https://wordpress.org/plugins/index-wp-mysql-for-speed/),
   I did review its source code out of curiosity. One concern I noted is that it
   removes some existing database indexes, which could potentially lead to issues,
   particularly with future WordPress updates and backward compatibility.
 * Instead, a more tailored approach might be beneficial—one that involves analyzing
   slow SQL queries and selectively adding indexes to optimize performance. This
   way, you’re addressing the specific needs of your site rather than relying on
   a plugin that may add unnecessary indexes.
 * If you decide to use the plugin, I **strongly recommend(!)** backing up your 
   database first. It’s also wise to test the plugin on a copy of your website **
   first** to ensure it delivers the desired results without causing any issues.
   My concern, as mentioned, is the potential backward compatibility risks associated
   with removing existing WordPress indexes. This could lead to problems when updating
   your WordPress website to newer versions in the future.
 * To clarify, I’m not offering my services, but you can try [https://jobs.wordpress.net](https://jobs.wordpress.net/)
   for finding qualified help.
    -  This reply was modified 1 year, 9 months ago by [Anton Vlasenko](https://wordpress.org/support/users/antonvlasenko/).
    -  This reply was modified 1 year, 9 months ago by [Anton Vlasenko](https://wordpress.org/support/users/antonvlasenko/).
 *  Thread Starter [Vimal Roy](https://wordpress.org/support/users/vimalroy08/)
 * (@vimalroy08)
 * [1 year, 9 months ago](https://wordpress.org/support/topic/slow-query-performance/#post-17978110)
 * Hi [@antonvlasenko](https://wordpress.org/support/users/antonvlasenko/) ,
 * Thank you for your response and for confirming the indexing type.
 * I appreciate your caution about the plugin and the potential risks with removing
   existing indexes. We’ll make sure to back up the database and test any changes
   in a staging environment before applying them to the live site. Your suggestion
   to analyze slow queries and add indexes selectively makes sense, and we’ll consider
   that approach.
 * Thanks for your help and the recommendation for finding qualified support. We’ll
   keep it in mind if needed.
 * Best regards,
   Vimal Roy

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Slow query performance!!’ is closed to new replies.

## Tags

 * [database](https://wordpress.org/support/topic-tag/database/)
 * [MySQL](https://wordpress.org/support/topic-tag/mysql/)
 * [optimization](https://wordpress.org/support/topic-tag/optimization/)
 * [performance](https://wordpress.org/support/topic-tag/performance/)
 * [postmeta](https://wordpress.org/support/topic-tag/postmeta/)
 * [posts](https://wordpress.org/support/topic-tag/posts/)
 * [server](https://wordpress.org/support/topic-tag/server/)
 * [table](https://wordpress.org/support/topic-tag/table/)
 * [wp_postmeta](https://wordpress.org/support/topic-tag/wp_postmeta/)
 * [wp_posts](https://wordpress.org/support/topic-tag/wp_posts/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 4 replies
 * 2 participants
 * Last reply from: [Vimal Roy](https://wordpress.org/support/users/vimalroy08/)
 * Last activity: [1 year, 9 months ago](https://wordpress.org/support/topic/slow-query-performance/#post-17978110)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
