xiaoweiX
|
According to newrelic, wpml related queries are the slowest on my site, hidden link
Full queries:
1.
SELECT wpml_translations.element_id, tax.term_id, tax.taxonomy FROM wp_icl_translations wpml_translations JOIN wp_term_taxonomy tax ON wpml_translations.element_id = tax.term_taxonomy_id AND wpml_translations.element_type = CONCAT(?, tax.taxonomy) JOIN wp_terms terms ON terms.term_id = tax.term_id WHERE tax.term_id != tax.term_taxonomy_id AND tax.term_id = ?
2.
SELECT wpml_translations.translation_id, wpml_translations.element_id, wpml_translations.language_code, wpml_translations.source_language_code, wpml_translations.trid, wpml_translations.element_type FROM wp_icl_translations wpml_translations JOIN wp_term_taxonomy tax ON wpml_translations.element_id = tax.term_taxonomy_id AND wpml_translations.element_type = CONCAT(?, tax.taxonomy) JOIN wp_icl_translations tridt ON tridt.element_type = wpml_translations.element_type AND tridt.trid = wpml_translations.trid WHERE tridt.trid = (SELECT trid FROM wp_icl_translations wpml_translations JOIN wp_term_taxonomy tax ON wpml_translations.element_id = tax.term_taxonomy_id AND wpml_translations.element_type = CONCAT(?, tax.taxonomy) WHERE element_id = ? LIMIT ?)
Any ways to optimize?
|
Carlos Rojas
Supporter
Languages:
English (English )
Spanish (Español )
Timezone:
Europe/Madrid (GMT+01:00)
|
Hello,
Thank you for contacting us
These queries take more time if there are more terms to search from. In any case, could you tell me in what action are you seeing this query?
Regards,
Carlos
|