{"id":7623,"date":"2011-05-27T09:45:54","date_gmt":"2011-05-27T09:45:54","guid":{"rendered":"http:\/\/wpml.org\/?post_type=faq&#038;p=7623"},"modified":"2023-09-06T08:35:34","modified_gmt":"2023-09-06T08:35:34","slug":"how-to-optimize-mysql-queries","status":"publish","type":"faq","link":"https:\/\/wpml.org\/he\/faq\/how-to-optimize-mysql-queries\/","title":{"rendered":"How can I optimize MySQL queries for translated pages?"},"content":{"rendered":"<p class=\"lead\">You can optimize MySQL queries by first checking where problems are coming from. When you see an unexpectedly large number of queries, check your <strong>String Translation Tracking <\/strong>and <strong>Auto ID Adjust <\/strong>as potential sources.<\/p>\n<p>To learn more about identifying performance issues using the <strong>Debug Objects <\/strong>plugin, visit our <a href=\"https:\/\/wpml.org\/he\/faq\/how-to-debug-performance-problems\/\">FAQ on debugging performance problems<\/a>.<\/p>\n<h2>How to optimize String Translation Tracking?<\/h2>\n<p>String Translation Tracking triggers SQL queries when you're logged in as Admin. To enhance performance, navigate to <strong>WPML <\/strong>\u2192 <strong>String Translation <\/strong>and make sure that <strong>Track where strings appear on the site <\/strong>is not checked. <\/p>\n<h2>How to optimize Auto ID Adjust?<\/h2>\n<p>If <strong>Adjust IDs for multilingual functionality<\/strong> is selected, WPML will perform SQL queries whenever the theme tries to load items with specific IDs.<\/p>\n<p>You can disable this option in in <strong>WPML <\/strong>\u2192 <strong>Languages <\/strong>\u2192 <strong>Make themes work multilingual <\/strong>and use <strong>icl_object_id<\/strong> and other functions from <a title=\"WPML Coding API\" href=\"https:\/\/wpml.org\/documentation\/support\/wpml-coding-api\/\">WPML's API <\/a>instead, to turn your theme multilingual.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>When you see an unexpectedly large number of queries you can improve performance of translated pages by turning off the String Translation Tracking and Auto ID Adjust features.<\/p>\n","protected":false},"author":2,"featured_media":0,"menu_order":90,"template":"","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"ep_exclude_from_search":false,"footnotes":""},"faq-category":[26137],"class_list":["post-7623","faq","type-faq","status-publish","hentry","faq-category-how-to"],"_links":{"self":[{"href":"https:\/\/wpml.org\/he\/wp-json\/wp\/v2\/faq\/7623","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wpml.org\/he\/wp-json\/wp\/v2\/faq"}],"about":[{"href":"https:\/\/wpml.org\/he\/wp-json\/wp\/v2\/types\/faq"}],"author":[{"embeddable":true,"href":"https:\/\/wpml.org\/he\/wp-json\/wp\/v2\/users\/2"}],"version-history":[{"count":8,"href":"https:\/\/wpml.org\/he\/wp-json\/wp\/v2\/faq\/7623\/revisions"}],"predecessor-version":[{"id":14349409,"href":"https:\/\/wpml.org\/he\/wp-json\/wp\/v2\/faq\/7623\/revisions\/14349409"}],"wp:attachment":[{"href":"https:\/\/wpml.org\/he\/wp-json\/wp\/v2\/media?parent=7623"}],"wp:term":[{"taxonomy":"faq-category","embeddable":true,"href":"https:\/\/wpml.org\/he\/wp-json\/wp\/v2\/faq-category?post=7623"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}