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.
Manage Cookie Consent
We use cookies to optimize our website and services. Your consent allows us to process data such as browsing behavior. Not consenting may affect some features.
Functional
Always active
Required for our website to operate and communicate correctly.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
We use these to analyze the statistics of our site. Collected information is completely anonymous.The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
These cookies track your browsing to provide ads relevant to you.