Skip Navigation

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This topic contains 1 reply, has 0 voices.

Last updated by Andrey 1 month, 2 weeks ago.

Author Posts
February 21, 2025 at 1:40 pm #16733826

Apa SEO

Background of the issue:
I am developing a site and using the Query Monitor plugin. I noticed that WPML_Element_Translation->maybe_populate_cache is performing 3400+ queries when opening a page. I'm using Relevanssi search results, but the results are limited to 150. Many queries use the SQL 'IN' operator for a single item, such as "...WHERE tridt.element_id IN(861)", "...WHERE tridt.element_id IN(2102)". This happens on each page, and on the homepage the query number is 3900+.

Symptoms:
WPML_Element_Translation->maybe_populate_cache is performing an excessive number of queries, over 3400, when loading a page.

Questions:
Are really 3462 queries needed?
Is there any way to optimize such queries?

February 23, 2025 at 4:13 pm #16738242

Andrey
Supporter

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+03:00)

While one of my teammates takes care of your ticket, I will provide you with the first debugging steps.

Please upload any relevant screenshots that would help illustrate the problem. What is the page you are opening?

Here you can learn about WPML’s Database Model:
https://wpml.org/documentation/support/wpml-tables/

Please update your WPML plugin and add-ons to the latest version, 4.7.1, to benefit from the latest bug fixes and improvements.

You can check the latest released versions under "My Account -> Downloads" on this site. Instructions to update can be found here: http://wpml.org/faq/install-wpml/

If you do not see the updates, you might need to click the Check for updates button in the Plugins → Add New Plugin → Commercial tab.

Please remember to backup your database before you proceed.

The topic ‘[Closed] Query optimization for WPML_Element_Translation’ is closed to new replies.