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?
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.